|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.cMsg.cMsgDomain.server.cMsgServerSubscribeInfo
public class cMsgServerSubscribeInfo
Class to store the record of a server client's subscription to a particular message subject, type, and namespace. It also stores a record of all subscribeAndGet calls to the same subject, type, and namespace. Used by the cMsgDomainServer class.
Constructor Summary | |
---|---|
cMsgServerSubscribeInfo(java.lang.String subject,
java.lang.String type,
java.lang.String namespace,
cMsgClientInfo info)
Constructor used by cMsgDomainServer object basically for storage of subject, type, namespace and callbacks for subscribes. |
|
cMsgServerSubscribeInfo(java.lang.String subject,
java.lang.String type,
java.lang.String namespace,
cMsgClientInfo info,
int id,
cMsgCallbackAdapter cb)
Constructor used by cMsgDomainServer object basically for storage of subject, type, namespace and callbacks for subAndGets. |
Method Summary | |
---|---|
void |
addSubAndGetter(int id,
cMsgCallbackAdapter cb)
Adds an entry to a hashmap with the subscribeAndGet id as the key and the callback object as the value. |
void |
addSubscription()
Calling this method means this client is now subscribed to this sub/type/namespace. |
java.util.HashMap<java.lang.Integer,cMsgCallbackAdapter> |
getSubAndGetters()
Gets the HashMap containing the subscribeAndGet id generated by the originating client as the key (receiverSubscribeId which identifies the particular subscribeAndGet call in question), and the value which is the callback object of that subscribeAndGet. |
boolean |
isSubscribed()
Is the client subscribed or are there only subAndGets? |
int |
numberOfSubscribers()
Gets the number of subscriptions a client has to a subject, type, namespace combination. |
void |
removeSubAndGetter(int id)
Removes an entry to a hashmap with the subscribeAndGet id as the key and the callback object as the value. |
void |
removeSubscription()
Calling this method means this client is not subscribed to this sub/type/namespace anymore. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public cMsgServerSubscribeInfo(java.lang.String subject, java.lang.String type, java.lang.String namespace, cMsgClientInfo info)
subject
- subscription subjecttype
- subscription typenamespace
- subscription's namespaceinfo
- client information objectpublic cMsgServerSubscribeInfo(java.lang.String subject, java.lang.String type, java.lang.String namespace, cMsgClientInfo info, int id, cMsgCallbackAdapter cb)
subject
- subscription subjecttype
- subscription typenamespace
- subscription's namespaceinfo
- client information objectid
- receiverSubscribeId of subscribeAndGet requestcb
- callback of subscribeAndGetMethod Detail |
---|
public void addSubscription() throws cMsgException
cMsgException
- if user tries to subscribe more than once (subscribeAndGet NOT
included)public void removeSubscription()
public boolean isSubscribed()
public java.util.HashMap<java.lang.Integer,cMsgCallbackAdapter> getSubAndGetters()
public void addSubAndGetter(int id, cMsgCallbackAdapter cb)
id
- id of subscribeAndGet callcb
- callback objectpublic void removeSubAndGetter(int id)
id
- subscribeAndGet id keypublic int numberOfSubscribers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |