|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 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. |
Method Summary | |
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. |
Field Detail |
public static final String PLASTIC_VERSION_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuespublic static final String PLASTIC_XMLRPC_URL_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuespublic static final String PLASTIC_RMI_PORT_KEY
PLASTIC_CONFIG_FILENAME
,
Constant Field Valuespublic static final String PLASTIC_CONFIG_FILENAME
Method Detail |
public List getRegisteredIds()
public URI getHubId()
public String getName(URI plid)
plid
- the plastic ID returned at registration
public List getUnderstoodMessages(URI plid)
plid
- the plastic ID returned at registration
public List getMessageRegisteredIds(URI message)
message
- the messageId you're interested in
public URI 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)
public URI registerRMI(String name, List supportedMessages, PlasticListener caller)
registerXMLRPC
name
- see registerRMI
caller
- the PlasticListener that wishes to registerfor other parameters
PlasticListener
. Then you register with the
hub to receive ALL messages using URI id = hub.registerRMI("MyApp", new ArrayList(),this);
public URI registerNoCallBack(String name)
for parameters
public void unregister(URI id)
id
- the application to unregisterpublic Map 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 message
public Map 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)public 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.public void requestAsynch(URI sender, URI message, List args)
request
for details of parameters.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |