|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.starlink.plastic.PlasticMonitor
Watches and reports on messages sent over a PLASTIC message bus. Designed principally to aid with debugging, both of PLASTIC infrastructure and of PLASTIC-aware applications.
This class is intended to be used standalone from its main(java.lang.String[])
method.
| Field Summary |
| Fields inherited from interface org.votech.plastic.PlasticListener |
CURRENT_VERSION |
| Constructor Summary | |
PlasticMonitor(String name,
boolean multiclient,
PrintStream logOut,
PrintStream warnOut)
Constructor. |
|
| Method Summary | |
String |
getName()
Returns the application generic name. |
URI[] |
getSupportedMessages()
Returns the messages which the application will support. |
static void |
main(String[] args)
Starts a monitor of the PLASTIC message bus which logs message descriptions to standard output. |
Object |
perform(URI sender,
URI message,
List args)
Request that the application perform an action based on a message. |
void |
setHub(PlasticHubListener hub)
Sets the hub this monitor is listening to. |
void |
setListModel(uk.ac.starlink.plastic.ApplicationListModel listModel)
Sets a list model this monitor should keep up to date. |
static String |
stringify(Object value)
Stringifies an object for logging purposes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PlasticMonitor(String name,
boolean multiclient,
PrintStream logOut,
PrintStream warnOut)
name - application namemulticlient - true if you want it to attempt to implement
all known messageslogOut - logging output streamwarnOut - warning output stream| Method Detail |
public String getName()
PlasticApplication
getName in interface PlasticApplicationpublic URI[] getSupportedMessages()
PlasticApplication
getSupportedMessages in interface PlasticApplication
public Object perform(URI sender,
URI message,
List args)
PlasticListener
perform in interface PlasticListenersender - the ID of the originating application.message - the URI representing the action.args - any arguments to pass.
public void setHub(PlasticHubListener hub)
hub - hubpublic void setListModel(uk.ac.starlink.plastic.ApplicationListModel listModel)
listModel - model of registered applicationspublic static String stringify(Object value)
value - object to stringify
public static void main(String[] args)
throws IOException
MessageDefinition class)
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||