org.jlab.coda.cMsg
Interface cMsgSubscriptionHandle


public interface cMsgSubscriptionHandle

This interface is implemented by the object returned by calling cMsg.subscribe(java.lang.String, java.lang.String, org.jlab.coda.cMsg.cMsgCallbackInterface, java.lang.Object). The returned object may be used to query and control the subscription to some degree.


Method Summary
 void clearQueue()
          Clears the queue of all messages.
 cMsgCallbackInterface getCallback()
          Gets the callback object.
 java.lang.String getDomain()
          Gets the domain in which this subscription lives.
 long getMsgCount()
          Gets the total number of messages passed to the callback.
 int getQueueSize()
          Gets the number of messages in the queue.
 java.lang.String getSubject()
          Gets the subject of this subscription.
 java.lang.String getType()
          Gets the type of this subscription.
 java.lang.Object getUserObject()
          Gets the subscription's user object argument.
 boolean isQueueFull()
          Returns true if queue is full.
 void pause()
          This method stops any further calling of the callback.
 void restart()
          This method resumes any calling of the callback delayed by the pause() method.
 

Method Detail

pause

void pause()
This method stops any further calling of the callback. Any threads currently running the callback continue normally. Messages are still being delivered to this callback's queue.


restart

void restart()
This method resumes any calling of the callback delayed by the pause() method.


getQueueSize

int getQueueSize()
Gets the number of messages in the queue.

Returns:
number of messages in the queue

isQueueFull

boolean isQueueFull()
Returns true if queue is full.

Returns:
true if queue is full

clearQueue

void clearQueue()
Clears the queue of all messages.


getMsgCount

long getMsgCount()
Gets the total number of messages passed to the callback.

Returns:
total number of messages passed to the callback

getDomain

java.lang.String getDomain()
Gets the domain in which this subscription lives.

Returns:
the domain in which this subscription lives

getSubject

java.lang.String getSubject()
Gets the subject of this subscription.

Returns:
the subject of this subscription

getType

java.lang.String getType()
Gets the type of this subscription.

Returns:
the type of this subscription

getCallback

cMsgCallbackInterface getCallback()
Gets the callback object.

Returns:
user callback object

getUserObject

java.lang.Object getUserObject()
Gets the subscription's user object argument.

Returns:
subscription's user object argument