public class QueueingSubscriptionManager extends AbstractSubscriptionManager
AbstractSubscriptionManager.EntitySensorToken
Modifier and Type | Field and Description |
---|---|
AbstractSubscriptionManager |
delegate |
boolean |
useDelegateForPublishing |
boolean |
useDelegateForSubscribing |
Constructor and Description |
---|
QueueingSubscriptionManager() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<SubscriptionHandle> |
getSubscriptionsForEntitySensor(Entity source,
Sensor<?> sensor)
Return the subscriptions on a given source-sensor pair
|
java.util.Set<SubscriptionHandle> |
getSubscriptionsForSubscriber(java.lang.Object subscriber)
Return the subscriptions requested by a given subscriber
|
<T> void |
publish(SensorEvent<T> event)
performs the actual publishing -- ie distribution to subscriptions
|
void |
setDelegate(AbstractSubscriptionManager delegate) |
void |
startDelegatingForPublishing() |
void |
startDelegatingForSubscribing() |
void |
stopDelegatingForPublishing() |
void |
stopDelegatingForSubscribing() |
boolean |
unsubscribe(SubscriptionHandle subscriptionId)
Unsubscribe the given subscription id.
|
subscribe, subscribe, subscribeToChildren, subscribeToChildren, subscribeToMembers, subscribeToMembers
public AbstractSubscriptionManager delegate
public boolean useDelegateForSubscribing
public boolean useDelegateForPublishing
public <T> void publish(SensorEvent<T> event)
AbstractSubscriptionManager
publish
in interface SubscriptionManager
publish
in class AbstractSubscriptionManager
public void setDelegate(AbstractSubscriptionManager delegate)
public void startDelegatingForSubscribing()
public void startDelegatingForPublishing()
public void stopDelegatingForSubscribing()
public void stopDelegatingForPublishing()
public boolean unsubscribe(SubscriptionHandle subscriptionId)
SubscriptionManager
SubscriptionManager.subscribe(Map, Entity, Sensor, SensorEventListener)
public java.util.Set<SubscriptionHandle> getSubscriptionsForSubscriber(java.lang.Object subscriber)
SubscriptionManager
public java.util.Set<SubscriptionHandle> getSubscriptionsForEntitySensor(Entity source, Sensor<?> sensor)
SubscriptionManager