|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PlasticHubListener
The interface that a Plastic Hub should support. For information on what a Plastic Hub is, and why you'd want one, please see the URL below.
Field Summary | |
---|---|
static java.lang.String |
PLASTIC_CONFIG_FILENAME
The name of the file containing Plastic Hub config information (placed in ${user.home}). |
static java.lang.String |
PLASTIC_RMI_PORT_KEY
The key used to get the RMI port out of the Plastic Hub config file. |
static java.lang.String |
PLASTIC_VERSION_KEY
The key used to get the plastic.version out of the Plastic Hub config file. |
static java.lang.String |
PLASTIC_XMLRPC_URL_KEY
The key used to get the URL of the xml-rpc server out of the Plastic Hub config file. |
Method Summary | |
---|---|
java.net.URI |
getHubId()
Get this hub's ID. |
java.util.List<java.net.URI> |
getMessageRegisteredIds(java.net.URI message)
Get all the applications that support a particular message |
java.lang.String |
getName(java.net.URI plid)
Get the name of this application, as used at registration. |
java.util.List<java.net.URI> |
getRegisteredIds()
Get all the IDs of the currently registered applications. |
java.util.List<java.net.URI> |
getUnderstoodMessages(java.net.URI plid)
Get the messages understood by this application. |
java.net.URI |
registerNoCallBack(java.lang.String name)
Register this application with the hub, but don't send it any messages in return. |
java.net.URI |
registerRMI(java.lang.String name,
java.util.List<java.net.URI> supportedMessages,
PlasticListener caller)
A java-rmi version of registerXMLRPC |
java.net.URI |
registerXMLRPC(java.lang.String name,
java.util.List<java.net.URI> supportedMessages,
java.net.URL callBackURL)
Register an application with the hub. |
java.util.Map<java.net.URI,java.lang.Object> |
request(java.net.URI sender,
java.net.URI message,
java.util.List<java.lang.Object> args)
Send a message to all registered Plastic applications. |
void |
requestAsynch(java.net.URI sender,
java.net.URI message,
java.util.List<java.lang.Object> args)
Send a request to all registered Plastic apps, but don't wait for a response. |
java.util.Map<java.net.URI,java.lang.Object> |
requestToSubset(java.net.URI sender,
java.net.URI message,
java.util.List<java.lang.Object> args,
java.util.List<java.net.URI> recipientIds)
Send a request to listed registered Plastic apps. |
void |
requestToSubsetAsynch(java.net.URI sender,
java.net.URI message,
java.util.List<java.lang.Object> args,
java.util.List<java.net.URI> recipientIds)
Send a request to listed registered Plastic apps, but don't wait for a response. |
void |
unregister(java.net.URI id)
Unregister the application from the hub. |
Field Detail |
---|
static final java.lang.String PLASTIC_VERSION_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuesstatic final java.lang.String PLASTIC_XMLRPC_URL_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuesstatic final java.lang.String PLASTIC_RMI_PORT_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuesstatic final java.lang.String PLASTIC_CONFIG_FILENAME
Method Detail |
---|
java.util.List<java.net.URI> getRegisteredIds()
java.net.URI getHubId()
java.lang.String getName(java.net.URI plid)
plid
- the plastic ID returned at registration
java.util.List<java.net.URI> getUnderstoodMessages(java.net.URI plid)
plid
- the plastic ID returned at registration
java.util.List<java.net.URI> getMessageRegisteredIds(java.net.URI message)
message
- the messageId you're interested in
java.net.URI registerXMLRPC(java.lang.String name, java.util.List<java.net.URI> supportedMessages, java.net.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.callBackURL
- the application's internal xmlrpc server URL. Used by the hub to send messages to the
application.
registerRMI(String, List, PlasticListener)
,
registerNoCallBack(String)
java.net.URI registerRMI(java.lang.String name, java.util.List<java.net.URI> supportedMessages, PlasticListener caller)
registerXMLRPC
name
- see registerRMI
caller
- the PlasticListener that wishes to registerfor other parameters
java.net.URI registerNoCallBack(java.lang.String name)
for parameters
void unregister(java.net.URI id)
id
- the application to unregisterjava.util.Map<java.net.URI,java.lang.Object> request(java.net.URI sender, java.net.URI message, java.util.List<java.lang.Object> 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 message
java.util.Map<java.net.URI,java.lang.Object> requestToSubset(java.net.URI sender, java.net.URI message, java.util.List<java.lang.Object> args, java.util.List<java.net.URI> recipientIds)
request
for
details of the other parameters.
recipientIds
- a list of target application ids (as URIs)void requestToSubsetAsynch(java.net.URI sender, java.net.URI message, java.util.List<java.lang.Object> args, java.util.List<java.net.URI> recipientIds)
recipientIds
- a List of target application ids (as URIs). See request
for
details of the other parameters.void requestAsynch(java.net.URI sender, java.net.URI message, java.util.List<java.lang.Object> args)
request
for details of parameters.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |