|
xmlBlaster 2.0.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xmlBlaster.client.UpdateDispatcher
public final class UpdateDispatcher
Dispatches callback messages depending on the subscriptionId to the specific client listener.
| Nested Class Summary | |
|---|---|
(package private) class |
UpdateDispatcher.CallbackInfo
Inner helper class to hold ACK/NAK state of subscriptions. |
| Field Summary | |
|---|---|
private java.util.HashMap |
callbackMap
This map contains the registered callback interfaces for given subscriptions. |
private Global |
glob
|
private static java.lang.String |
ME
|
| Constructor Summary | |
|---|---|
UpdateDispatcher(Global glob)
|
|
| Method Summary | |
|---|---|
void |
ackSubscription(java.lang.String subscriptionId)
Mark that a subscribe() invocation returned (is the server ACK). |
void |
addCallback(java.lang.String subscriptionId,
I_Callback callback,
boolean isPersistent)
Register a callback interface with the given subscriptionId |
void |
clear()
Remove all callback registrations |
int |
clearAckNonPersistentSubscriptions()
Clear all subscribes which where marked as acknowledged |
void |
clearNAKSubscriptions()
Clear all subscribes which where not marked as acknowledged |
I_Callback |
getCallback(java.lang.String subscriptionId)
Access a callback interface for the given subscriptionId |
I_Callback[] |
getCallbacks()
Returns a current snapshot (shallow copy). |
java.lang.String[] |
getSubscriptionIds()
Returns a current snapshot. |
I_Callback |
removeCallback(java.lang.String subscriptionId)
Remove the callback interface for the given subscriptionId |
int |
size()
Get number of callback registrations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String ME
private final Global glob
private final java.util.HashMap callbackMap
| Constructor Detail |
|---|
public UpdateDispatcher(Global glob)
| Method Detail |
|---|
public void addCallback(java.lang.String subscriptionId,
I_Callback callback,
boolean isPersistent)
public I_Callback getCallback(java.lang.String subscriptionId)
public void ackSubscription(java.lang.String subscriptionId)
subscriptionId - The subcribepublic I_Callback[] getCallbacks()
public java.lang.String[] getSubscriptionIds()
public I_Callback removeCallback(java.lang.String subscriptionId)
public int size()
public void clear()
public int clearAckNonPersistentSubscriptions()
public void clearNAKSubscriptions()
|
xmlBlaster 2.0.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||