public interface PlasticHubListener
Modifier and Type | Field and Description |
---|---|
static String |
PLASTIC_CONFIG_FILENAME
The name of the file containing Plastic Hub config information (placed in ${user.home}).
|
static String |
PLASTIC_RMI_PORT_KEY
The key used to get the RMI port out of the Plastic Hub config file.
|
static String |
PLASTIC_VERSION_KEY
The key used to get the plastic.version out of the Plastic Hub config file.
|
static String |
PLASTIC_XMLRPC_URL_KEY
The key used to get the URL of the xml-rpc server out of the Plastic Hub config file.
|
Modifier and Type | Method and Description |
---|---|
URI |
getHubId()
Get this hub's ID.
|
List |
getMessageRegisteredIds(URI message)
Get all the applications that support a particular message
|
String |
getName(URI plid)
Get the name of this application, as used at registration.
|
List |
getRegisteredIds()
Get all the IDs of the currently registered applications.
|
List |
getUnderstoodMessages(URI plid)
Get the messages understood by this application.
|
URI |
registerNoCallBack(String name)
Register this application with the hub, but don't send it any messages in return.
|
URI |
registerRMI(String name,
List supportedMessages,
PlasticListener caller)
A java-rmi version of
registerXMLRPC |
URI |
registerXMLRPC(String name,
List supportedMessages,
URL callBackURL)
Register an application with the hub.
|
Map |
request(URI sender,
URI message,
List args)
Send a message to all registered Plastic applications.
|
void |
requestAsynch(URI sender,
URI message,
List args)
Send a request to all registered Plastic apps, but don't wait for a response.
|
Map |
requestToSubset(URI sender,
URI message,
List args,
List recipientIds)
Send a request to listed registered Plastic apps.
|
void |
requestToSubsetAsynch(URI sender,
URI message,
List args,
List recipientIds)
Send a request to listed registered Plastic apps, but don't wait for a response.
|
void |
unregister(URI id)
Unregister the application from the hub.
|
static final String PLASTIC_VERSION_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuesstatic final String PLASTIC_XMLRPC_URL_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuesstatic final String PLASTIC_RMI_PORT_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuesstatic final String PLASTIC_CONFIG_FILENAME
List getRegisteredIds()
URI getHubId()
String getName(URI plid)
plid
- the plastic ID returned at registrationList getUnderstoodMessages(URI plid)
plid
- the plastic ID returned at registrationList getMessageRegisteredIds(URI message)
message
- the messageId you're interested inURI registerXMLRPC(String name, List supportedMessages, URL callBackURL)
name
- An optional string with a short name describing the application. This may be added to the hub
assigned ID, making it more human friendly.supportedMessages
- an array of messages (as URIs) the application is interested in. An empty List signifies
"all".callBackURL
- the application's internal xmlrpc server URL. Used by the hub to send messages to the
application.registerRMI(String, List, PlasticListener)
,
registerNoCallBack(String)
URI registerRMI(String name, List supportedMessages, PlasticListener caller)
registerXMLRPC
name
- see registerRMI
caller
- the PlasticListener that wishes to registerfor other parameters
URI registerNoCallBack(String name)
for parameters
void unregister(URI id)
id
- the application to unregisterMap request(URI sender, URI message, List args)
sender
- the id of the originating tool - provided by the hub on
registration. Note that the hub is at liberty to refused to forward requests that
don't come from an ID that it has registered.message
- the message to send.args
- any arguments to pass with the messageMap requestToSubset(URI sender, URI message, List args, List recipientIds)
request
for
details of the other parameters.recipientIds
- a list of target application ids (as URIs)void requestToSubsetAsynch(URI sender, URI message, List args, List recipientIds)
recipientIds
- a List of target application ids (as URIs). See request
for
details of the other parameters.Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.