Package emissary.place
Interface IServiceProviderPlace
-
- All Known Subinterfaces:
EmptyFormPlace
,IDirectoryPlace
,IJniRepositoryPlace
,IMultiFileServerPlace
,IMultiFileUnixCommandPlace
,IPickUpPlace
,IRemoteDirectory
,RehashingPlace
- All Known Implementing Classes:
Analyzer
,CachePlace
,ComparisonPlace
,CoordinationPlace
,DelayPlace
,DevNullPlace
,DirectoryPlace
,DropOffPlace
,FilePickUpClient
,FilePickUpPlace
,HtmlEscapePlace
,IdPlace
,JavascriptEscapePlace
,JniRepositoryPlace
,JsonEscapePlace
,KffHashPlace
,MultiFileServerPlace
,MultiFileUnixCommandPlace
,PickUpPlace
,PickUpSpace
,ServiceProviderPlace
,SizeIdPlace
,TemplatePlace
,ToLowerPlace
,ToUpperPlace
,UnixCommandPlace
,UnixFilePlace
,VersionPlace
public interface IServiceProviderPlace
IServiceProviderPlace. IServiceProviderPlaces can be created by the emissary.admin.PlaceStarter and registered with the emissary.directory.IDirectoryPlace to make their respective services available and a specified cost and quality throughout the system.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SPROUT_KEY
Used as a marker on the transofrm history of a payload when we sprout it, between the parent's history and the new history of the sprout
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addKey(String key)
Add a full key to the running place.void
addServiceProxy(String serviceProxy)
Add a service proxy to a running place.void
agentProcessCall(IBaseDataObject payload)
Visiting agents call here to have a payload processedList<IBaseDataObject>
agentProcessHeavyDuty(IBaseDataObject payload)
Method called by the HD Agents to process a payloadList<IBaseDataObject>
agentProcessHeavyDuty(List<IBaseDataObject> payloadList)
Method called by the HD Agents for bulk processing of payloadsMobileAgent
getAgent()
Get the agent that is currently responsible for this threadDirectoryEntry
getDirectoryEntry()
Return an entry representing this place in the directoryString
getKey()
Get key for place, first one on list with '*' as service proxy if there are multiple entriesSet<String>
getKeys()
List the keys for this place registrationString
getPlaceName()
Get place nameString
getPrimaryProxy()
Return the first service proxy on the listSet<String>
getProxies()
Return a set of the service proxieslong
getResourceLimitMillis()
Get custom resource limitation in millis if specifiedboolean
isDenied(String s)
Returns whether form is deniedList<DirectoryEntry>
nextKeys(String dataId, IBaseDataObject payload, DirectoryEntry lastPlace)
Return list of next places to go with data.void
process(IBaseDataObject payload)
Override point for non-HD agent callsList<IBaseDataObject>
processHeavyDuty(IBaseDataObject payload)
Override point for HD Agent callsvoid
removeKey(String key)
Remove keyvoid
removeServiceProxy(String serviceProxy)
Remove a service proxy from the running place.void
shutDown()
Shutdown the place, freeing any resources
-
-
-
Field Detail
-
SPROUT_KEY
static final String SPROUT_KEY
Used as a marker on the transofrm history of a payload when we sprout it, between the parent's history and the new history of the sprout- See Also:
- Constant Field Values
-
-
Method Detail
-
nextKeys
List<DirectoryEntry> nextKeys(String dataId, IBaseDataObject payload, DirectoryEntry lastPlace)
Return list of next places to go with data. Delegation call through to our IDirectoryPlace- Parameters:
dataId
- the SERVICE_NAME::SERVICE_TYPElastPlace
- last place visited- Returns:
- list of DirectoryEntry
-
addServiceProxy
void addServiceProxy(String serviceProxy)
Add a service proxy to a running place. Duplicates are ignored.- Parameters:
serviceProxy
- the new proxy string to add
-
addKey
void addKey(String key)
Add a full key to the running place.- Parameters:
key
- the new key
-
removeKey
void removeKey(String key)
Remove key- Parameters:
key
- the key to remove
-
removeServiceProxy
void removeServiceProxy(String serviceProxy)
Remove a service proxy from the running place. Proxy strings not found registered will be ignored- Parameters:
serviceProxy
- the proxy string to remove
-
shutDown
void shutDown()
Shutdown the place, freeing any resources
-
agentProcessCall
void agentProcessCall(IBaseDataObject payload) throws ResourceException
Visiting agents call here to have a payload processed- Parameters:
payload
- the payload to be processed- Throws:
ResourceException
-
getDirectoryEntry
DirectoryEntry getDirectoryEntry()
Return an entry representing this place in the directory
-
agentProcessHeavyDuty
List<IBaseDataObject> agentProcessHeavyDuty(IBaseDataObject payload) throws Exception
Method called by the HD Agents to process a payload- Parameters:
payload
- the payload to be processed- Returns:
- list of IBaseDataObject result attachments
- Throws:
Exception
-
agentProcessHeavyDuty
List<IBaseDataObject> agentProcessHeavyDuty(List<IBaseDataObject> payloadList) throws Exception
Method called by the HD Agents for bulk processing of payloads- Parameters:
payloadList
- list of payloads to be processed- Returns:
- list of IBaseDataObject result attachments
- Throws:
Exception
-
processHeavyDuty
List<IBaseDataObject> processHeavyDuty(IBaseDataObject payload) throws ResourceException
Override point for HD Agent calls- Parameters:
payload
- the payload to be processed- Returns:
- list of IBaseDataObject result attachments
- Throws:
ResourceException
-
process
void process(IBaseDataObject payload) throws ResourceException
Override point for non-HD agent calls- Parameters:
payload
- the payload to be processed- Throws:
ResourceException
-
getKey
String getKey()
Get key for place, first one on list with '*' as service proxy if there are multiple entries- Returns:
- the key of this place in the directory
-
getKeys
Set<String> getKeys()
List the keys for this place registration- Returns:
- list of string complete keys
-
getProxies
Set<String> getProxies()
Return a set of the service proxies- Returns:
- set of string values
-
getPrimaryProxy
String getPrimaryProxy()
Return the first service proxy on the list- Returns:
- SERVICE_PROXY value or empty string if none
-
getPlaceName
String getPlaceName()
Get place name- Returns:
- string name of the place
-
getResourceLimitMillis
long getResourceLimitMillis()
Get custom resource limitation in millis if specified- Returns:
- -2 if not specified, or long millis if specified
-
getAgent
MobileAgent getAgent() throws NamespaceException
Get the agent that is currently responsible for this thread- Throws:
NamespaceException
-
isDenied
boolean isDenied(String s)
Returns whether form is denied
-
-