|
||||||||||
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.RCBroadcastDomain.RCBroadcast
public class RCBroadcast
This class implements the runcontrol broadcast (rdb) domain.
Field Summary |
---|
Fields inherited from class org.jlab.coda.cMsg.cMsgDomainAdapter |
---|
connected, description, domain, host, name, receiving, shutdownHandler, UDL, UDLremainder |
Constructor Summary | |
---|---|
RCBroadcast()
|
Method Summary | |
---|---|
void |
connect()
Method to connect to rc clients from this server. |
void |
disconnect()
Method to stop listening for packets from rc clients. |
void |
send(cMsgMessage message)
Method to send an abort command to the rc client. |
java.lang.Object |
subscribe(java.lang.String subject,
java.lang.String type,
cMsgCallbackInterface cb,
java.lang.Object userObj)
Method to subscribe to receive messages from rc clients. |
cMsgMessage |
subscribeAndGet(java.lang.String subject,
java.lang.String type,
int timeout)
This method is like a one-time subscribe. |
void |
unsubscribe(java.lang.Object obj)
Method to unsubscribe a previous subscription. |
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, syncSend |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RCBroadcast() 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
creating the UDP socketpublic 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 rc clientpublic 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
- ignored and set to "s"type
- ignored and set to "t"cb
- 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; if not connected
to an rc clientpublic 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 is no connection with rc clients; object is nullpublic cMsgMessage subscribeAndGet(java.lang.String subject, java.lang.String type, int timeout) throws cMsgException, java.util.concurrent.TimeoutException
subscribeAndGet
in interface cMsgDomainInterface
subscribeAndGet
in class cMsgDomainAdapter
subject
- ignored and set to "s"type
- ignored and set to "t"timeout
- time in milliseconds to wait for a message
cMsgException
- if there are communication problems with rc client;
subject and/or type is null or blank
java.util.concurrent.TimeoutException
- if timeout occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |