| Modifier and Type | Field and Description |
|---|---|
static String |
PLASTIC_FILE
Location in the user's home directory of the PLASTIC rendezvous file.
|
static String |
PLASTIC_VERSION
Version of PLASTIC interface implemented.
|
static boolean |
WARN_ABOUT_NOSUCHELEMENTEXCEPTIONS
True if spurious java.util.NoSuchElementExceptions should be flagged.
|
static String |
XMLRPC_PREFIX
Prefix for XML-RPC "perform" method.
|
| Modifier and Type | Method and Description |
|---|---|
static URI |
createURI(String uri)
Convenience method to turn a String into a URI without throwing
any pesky checked exceptions.
|
static org.apache.xmlrpc.XmlRpcClient |
createXmlRpcClient(URL url)
Factory method for obtaining a new XmlRpcClient.
|
static Icon |
getBroadcastIcon()
Returns an icon which conveys the idea of one-to-many transmission.
|
static PlasticHubListener |
getLocalHub()
Returns the PLASTIC hub running on the local host.
|
static Properties |
getPlasticProperties()
Returns the properties set which is stored in
PLASTIC_FILE. |
static String |
getPlasticProperty(String key)
Returns the value of a given property defined in the
PLASTIC_FILE file. |
static ApplicationItem[] |
getRegisteredApplications(PlasticHubListener hub)
Returns an array of ApplicationItem objects representing the
applications currently registered with a given hub.
|
static Icon |
getSendIcon()
Returns an icon which conveys the idea of point-to-point transmission.
|
static URL |
getXmlRpcUrl()
Returns the URL to use for the hub's XML-RPC server.
|
static boolean |
isHubRunning()
Attempts to determine if a plastic hub is currently running.
|
static PlasticConnection |
registerRMI(PlasticApplication app)
Registers a PlasticApplication with the current hub using RMI-type
communication.
|
static PlasticConnection |
registerXMLRPC(PlasticApplication app)
Registers a PlasticApplication with the current hub using XML-RPC type
communication.
|
static void |
singleRequestAsynch(String name,
URI message,
List args)
Sends a single asynchronous message to the hub
without registering for callback.
|
static void |
startExternalHub(boolean gui)
Attempts to start a hub running in an external process.
|
static Object |
targetRequest(String name,
URI message,
List args,
URI target)
Gets the result of a request to a single registered application
without registering for callback.
|
static Object |
targetRequest(URI sender,
URI message,
List args,
URI target)
Gets the result of a request to a single registered application
using an existing connection to the hub.
|
static void |
waitToRegister(HubManager hubMan,
int interval)
Blocks until a successful registration has been achieved.
|
public static final String PLASTIC_FILE
public static final String PLASTIC_VERSION
public static final String XMLRPC_PREFIX
public static boolean WARN_ABOUT_NOSUCHELEMENTEXCEPTIONS
public static PlasticHubListener getLocalHub() throws IOException
IOExceptionpublic static URL getXmlRpcUrl() throws IOException
IOExceptionpublic static boolean isHubRunning()
public static Properties getPlasticProperties() throws IOException
PLASTIC_FILE.IOExceptionpublic static String getPlasticProperty(String key) throws IOException
PLASTIC_FILE file. If it does not exist or has no value
an IOException is thrown. Null will not be returned.key - property keyIOExceptionpublic static PlasticConnection registerRMI(PlasticApplication app) throws IOException
app - application to registerapp registered
with the hubIOException - if the application could not registerpublic static PlasticConnection registerXMLRPC(PlasticApplication app) throws IOException
app - application to registerIOExceptionpublic static Object targetRequest(String name, URI message, List args, URI target) throws IOException
name - application namemessage - message IDargs - message argumentstarget - application ID of a registered application to which
the request is to be madeIOExceptionpublic static Object targetRequest(URI sender, URI message, List args, URI target) throws IOException
sender - application ID of registered listener from which
the request will be mademessage - message IDargs - message argumentstarget - application ID of a registered application to which
the request is to be madeIOExceptionpublic static void singleRequestAsynch(String name, URI message, List args) throws IOException
name - application namemessage - message IDargs - message argumentsIOExceptionpublic static void startExternalHub(boolean gui)
throws IOException
gui - true iff a window representing the hub is to be postedIOExceptionpublic static void waitToRegister(HubManager hubMan, int interval) throws InterruptedException
hubMan - hub manager objectinterval - number of milliseconds between registration attemptsInterruptedException - if the thread is interruptedpublic static ApplicationItem[] getRegisteredApplications(PlasticHubListener hub)
hub - the hubhubpublic static URI createURI(String uri)
uri - URI textIllegalArgumentException - if uri doesn't look like a URIpublic static org.apache.xmlrpc.XmlRpcClient createXmlRpcClient(URL url)
url - XML-RPC server URLurlpublic static Icon getSendIcon()
public static Icon getBroadcastIcon()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.