|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.cMsg.cMsgDomainAdapter
org.jlab.coda.cMsg.RCDomain.RunControl
public class RunControl
This class implements a cMsg client in the RunControl (or RC) domain.
Field Summary | |
---|---|
java.util.Set<cMsgSubscription> |
subscriptions
Collection of all of this client's message subscriptions which are cMsgSubscription objects. |
Fields inherited from class org.jlab.coda.cMsg.cMsgDomainAdapter |
---|
connected, description, domain, host, name, receiving, shutdownHandler, UDL, UDLremainder |
Constructor Summary | |
---|---|
RunControl()
Constructor. |
Method Summary | |
---|---|
void |
connect()
Method to connect to the codaComponent server from this client. |
void |
disconnect()
Method to close the connection to the domain server. |
void |
send(cMsgMessage message)
Method to send a message to the domain server for further distribution. |
java.lang.Object |
subscribe(java.lang.String subject,
java.lang.String type,
cMsgCallbackInterface cb,
java.lang.Object userObj)
Method to subscribe to receive messages of a subject and type from the domain server. |
void |
unsubscribe(java.lang.Object obj)
Method to unsubscribe a previous subscription to receive messages of a subject and type from the domain server. |
Methods inherited from class org.jlab.coda.cMsg.cMsgDomainAdapter |
---|
flush, getDescription, getDomain, getHost, getName, getShutdownHandler, getString, getUDL, getUDLRemainder, isConnected, isReceiving, monitor, sendAndGet, setDescription, setName, setShutdownHandler, setUDL, setUDLRemainder, shutdownClients, shutdownServers, start, stop, subscribeAndGet, syncSend |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.util.Set<cMsgSubscription> subscriptions
cMsgSubscription
objects. This set is synchronized. A client is either
a regular client or a bridge but not both. That means it does not matter that
a bridge client will add namespace data to the stored subscription but a regular
client will not.
Constructor Detail |
---|
public RunControl() throws cMsgException
cMsgException
Method Detail |
---|
public void connect() throws cMsgException
connect
in interface cMsgDomainInterface
connect
in class cMsgDomainAdapter
cMsgException
- if there are problems parsing the UDL or
communication problems with the server(s)public void disconnect()
disconnect
in interface cMsgDomainInterface
disconnect
in class cMsgDomainAdapter
public void send(cMsgMessage message) throws cMsgException
send
in interface cMsgDomainInterface
send
in class cMsgDomainAdapter
message
- message to send
cMsgException
- if there are communication problems with the server;
subject and/or type is nullpublic java.lang.Object subscribe(java.lang.String subject, java.lang.String type, cMsgCallbackInterface cb, java.lang.Object userObj) throws cMsgException
subscribe
in interface cMsgDomainInterface
subscribe
in class cMsgDomainAdapter
subject
- message subjecttype
- message typecb
- callback object whose single method is called upon receiving a message
of subject and typeuserObj
- any user-supplied object to be given to the callback method as an argument
cMsgException
- if the callback, subject and/or type is null or blank;
an identical subscription already exists; there are
communication problems with the serverpublic void unsubscribe(java.lang.Object obj) throws cMsgException
unsubscribe
in interface cMsgDomainInterface
unsubscribe
in class cMsgDomainAdapter
obj
- the object "handle" returned from a subscribe call
cMsgException
- if there are communication problems with the server; object arg is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |