|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.engine.ClientSubscriptions
public class ClientSubscriptions
Handling subscriptions, collected for each session of each client.
There exists exactly one instance of this class for each xmlBlaster server, the instance is handled by RequestBroker. The interface SubscriptionListener informs about subscribe/unsubscribe events
Field Summary | |
---|---|
private java.util.Map |
clientSubscriptionMap
All exact subscriptions of a Client are in this map. |
private static java.util.logging.Logger |
log
|
private java.util.Set |
querySubscribeRequestsSet
All generic subscriptions are collected here. |
Fields inherited from interface org.xmlBlaster.engine.I_SubscriptionListener |
---|
PRIO_01, PRIO_05, PRIO_10 |
Constructor Summary | |
---|---|
ClientSubscriptions(ServerScope glob,
RequestBroker requestBroker,
Authenticate authenticate)
Exactly one instance for each xmlBlaster server. |
Method Summary | |
---|---|
int |
getNumSubscriptions()
|
java.lang.Integer |
getPriority()
The priority by which it will be invoked. |
java.util.Set |
getQuerySubscribeRequestsSet()
All known subscriptions which match a query, but not those subscriptions which address exactly via key-oid |
java.util.ArrayList<SubscriptionInfo> |
getSubscription(SessionInfo sessionInfo,
QueryKeyData queryKey,
QueryQosData queryQos)
|
SubscriptionInfo |
getSubscription(SessionInfo sessionInfo,
java.lang.String subscriptionInfoUniqueKey)
If you have the unique id of a subscription, you may access the SubscriptionInfo object here. |
SubscriptionInfo |
getSubscription(java.lang.String subscriptionInfoUniqueKey)
If you have the unique id of a subscription, you may access the SubscriptionInfo object here. |
java.util.Vector<SubscriptionInfo> |
getSubscriptionByOid(SessionInfo sessionInfo,
java.lang.String keyOid,
boolean exactOnly)
|
java.util.Vector |
getSubscriptionByOid(java.lang.String keyOid,
boolean exactOnly)
|
java.lang.String |
getSubscriptionList()
|
java.lang.String[] |
getSubscriptions()
|
SubscriptionInfo[] |
getSubscriptions(SessionInfo sessionInfo)
Access all subscriptions of a client |
private void |
removeFromClientSubscriptionMap(SessionInfo sessionInfo,
java.lang.String subscriptionInfoUniqueKey)
|
private int |
removeFromQuerySubscribeRequestsSet(SessionInfo sessionInfo,
java.lang.String subscriptionInfoUniqueKey)
|
void |
sessionAdded(ClientEvent e)
Invoked on successful client login (interface I_ClientListener) |
void |
sessionPreRemoved(ClientEvent e)
Invoked before a client does a logout |
void |
sessionRemoved(ClientEvent e)
Invoked when client does a logout (interface I_ClientListener) |
void |
sessionUpdated(ClientEvent e)
Invoked on successful client re-login (interface I_ClientListener) |
void |
subjectAdded(ClientEvent e)
Event invoked on new created SubjectInfo. |
void |
subjectRemoved(ClientEvent e)
Event invoked on deleted SubjectInfo. |
void |
subscriptionAdd(SubscriptionEvent e)
Event invoked on new subscription (interface SubscriptionListener). |
void |
subscriptionRemove(SubscriptionEvent e)
Invoked when a subscription is canceled (interface SubscriptionListener). |
void |
topicRemove(TopicHandler topicHandler)
Event invoked on message erase() invocation. |
java.lang.String |
toXml()
Dump state of this object into XML. |
java.lang.String |
toXml(java.lang.String extraOffset)
Dump state of this object into XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.logging.Logger log
private final java.util.Map clientSubscriptionMap
These are the subscriptions which are referenced from a TopicHandler
including those with a query (XPATH).
A multimap would be appropriate, but since this is not supported
by the Collections API, a map with a set as value is used.
Used for performing logout.
key = client.getSessionName().getRelativeName() value = subMap (Collections.synchronizedMap(new HashMap());) with SubscriptionInfo objects
private final java.util.Set querySubscribeRequestsSet
value = SubscriptionInfo objects with generic subscriptions, but not those, who subscribed a MsgUnit exactly by a known oid
Constructor Detail |
---|
ClientSubscriptions(ServerScope glob, RequestBroker requestBroker, Authenticate authenticate) throws XmlBlasterException
requestBroker
- my master (singleton)authenticate
- another master
XmlBlasterException
Method Detail |
---|
public java.util.Set getQuerySubscribeRequestsSet()
public SubscriptionInfo getSubscription(SessionInfo sessionInfo, java.lang.String subscriptionInfoUniqueKey) throws XmlBlasterException
sessionInfo
- All infos about the clientsubscriptionInfoUniqueKey
-
XmlBlasterException
public SubscriptionInfo getSubscription(java.lang.String subscriptionInfoUniqueKey)
subscriptionInfoUniqueKey
-
public int getNumSubscriptions()
public java.lang.String getSubscriptionList()
public java.lang.String[] getSubscriptions()
public SubscriptionInfo[] getSubscriptions(SessionInfo sessionInfo)
public java.util.ArrayList<SubscriptionInfo> getSubscription(SessionInfo sessionInfo, QueryKeyData queryKey, QueryQosData queryQos) throws XmlBlasterException
XmlBlasterException
public java.util.Vector<SubscriptionInfo> getSubscriptionByOid(SessionInfo sessionInfo, java.lang.String keyOid, boolean exactOnly) throws XmlBlasterException
XmlBlasterException
public java.util.Vector getSubscriptionByOid(java.lang.String keyOid, boolean exactOnly) throws XmlBlasterException
XmlBlasterException
public void sessionAdded(ClientEvent e) throws XmlBlasterException
sessionAdded
in interface I_ClientListener
XmlBlasterException
public void sessionUpdated(ClientEvent e) throws XmlBlasterException
sessionUpdated
in interface I_ClientListener
XmlBlasterException
public void sessionPreRemoved(ClientEvent e) throws XmlBlasterException
I_ClientListener
sessionPreRemoved
in interface I_ClientListener
XmlBlasterException
public void sessionRemoved(ClientEvent e) throws XmlBlasterException
sessionRemoved
in interface I_ClientListener
XmlBlasterException
public void subjectAdded(ClientEvent e) throws XmlBlasterException
subjectAdded
in interface I_ClientListener
XmlBlasterException
public void subjectRemoved(ClientEvent e) throws XmlBlasterException
subjectRemoved
in interface I_ClientListener
XmlBlasterException
public void topicRemove(TopicHandler topicHandler) throws XmlBlasterException
XmlBlasterException
public void subscriptionAdd(SubscriptionEvent e) throws XmlBlasterException
subscriptionAdd
in interface I_SubscriptionListener
XmlBlasterException
public void subscriptionRemove(SubscriptionEvent e) throws XmlBlasterException
subscriptionRemove
in interface I_SubscriptionListener
XmlBlasterException
private void removeFromClientSubscriptionMap(SessionInfo sessionInfo, java.lang.String subscriptionInfoUniqueKey) throws XmlBlasterException
subscriptionInfoUniqueKey
- ==null: Remove client with all its subscriptionsXmlBlasterException
private int removeFromQuerySubscribeRequestsSet(SessionInfo sessionInfo, java.lang.String subscriptionInfoUniqueKey) throws XmlBlasterException
subscriptionInfoUniqueKey
- ==null: Remove client with all its subscriptionsXmlBlasterException
public final java.lang.String toXml() throws XmlBlasterException
XmlBlasterException
public final java.lang.String toXml(java.lang.String extraOffset) throws XmlBlasterException
extraOffset
- indenting of tags
XmlBlasterException
public java.lang.Integer getPriority()
I_SubscriptionListener
getPriority
in interface I_SubscriptionListener
I_SubscriptionListener.getPriority()
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |