public interface SubscriptionContext
Entity
can manage its subscriptions.Modifier and Type | Method and Description |
---|---|
java.util.Set<SubscriptionHandle> |
getSubscriptions()
Return the subscriptions associated with this context
|
<T> void |
publish(SensorEvent<T> event) |
<T> SubscriptionHandle |
subscribe(Entity producer,
Sensor<T> sensor,
SensorEventListener<? super T> listener) |
<T> SubscriptionHandle |
subscribe(java.util.Map<java.lang.String,?> flags,
Entity producer,
Sensor<T> sensor,
SensorEventListener<? super T> listener)
As
SubscriptionManager.subscribe(Map, Entity, Sensor, SensorEventListener) with default subscription parameters for this context |
<T> SubscriptionHandle |
subscribeToChildren(Entity parent,
Sensor<T> sensor,
SensorEventListener<? super T> listener) |
<T> SubscriptionHandle |
subscribeToChildren(java.util.Map<java.lang.String,java.lang.Object> flags,
Entity parent,
Sensor<T> sensor,
SensorEventListener<? super T> listener) |
<T> SubscriptionHandle |
subscribeToMembers(Group parent,
Sensor<T> sensor,
SensorEventListener<? super T> listener) |
<T> SubscriptionHandle |
subscribeToMembers(java.util.Map<java.lang.String,java.lang.Object> flags,
Group parent,
Sensor<T> sensor,
SensorEventListener<? super T> listener) |
boolean |
unsubscribe(SubscriptionHandle subscriptionId) |
int |
unsubscribeAll()
causes all subscriptions to be deregistered
|
<T> SubscriptionHandle subscribe(java.util.Map<java.lang.String,?> flags, Entity producer, Sensor<T> sensor, SensorEventListener<? super T> listener)
SubscriptionManager.subscribe(Map, Entity, Sensor, SensorEventListener)
with default subscription parameters for this context<T> SubscriptionHandle subscribe(Entity producer, Sensor<T> sensor, SensorEventListener<? super T> listener)
<T> SubscriptionHandle subscribeToChildren(java.util.Map<java.lang.String,java.lang.Object> flags, Entity parent, Sensor<T> sensor, SensorEventListener<? super T> listener)
<T> SubscriptionHandle subscribeToChildren(Entity parent, Sensor<T> sensor, SensorEventListener<? super T> listener)
<T> SubscriptionHandle subscribeToMembers(java.util.Map<java.lang.String,java.lang.Object> flags, Group parent, Sensor<T> sensor, SensorEventListener<? super T> listener)
<T> SubscriptionHandle subscribeToMembers(Group parent, Sensor<T> sensor, SensorEventListener<? super T> listener)
boolean unsubscribe(SubscriptionHandle subscriptionId)
int unsubscribeAll()
<T> void publish(SensorEvent<T> event)
SubscriptionManager.publish(SensorEvent)
java.util.Set<SubscriptionHandle> getSubscriptions()