|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
public interface SubscriptionManager
The mangement interface for subscriptions. Different implementations will handle entities subscribing and unsubscribing to SensorEvents and their delivery.
Method Summary | |
---|---|
java.util.Set
|
getSubscriptionsForEntitySensor(Entity source, Sensor sensor)
Return the subscriptions on a given source-sensor pair |
java.util.Set
|
getSubscriptionsForSubscriber(java.lang.Object subscriber)
Return the subscriptions requested by a given subscriber |
void
|
publish(SensorEvent event)
Deliver a SensorEvent to all subscribed listeners. |
SubscriptionHandle
|
subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)
Subscribe to Sensor data changes and events on a given Entity, supplying the SensorEventListener to invoke when they occur. |
SubscriptionHandle
|
subscribe(Entity parent, Sensor sensor, SensorEventListener listener)
@see #subscribe(Map, Entity, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribeToChildren(java.util.Map flags, Entity parent, Sensor sensor, SensorEventListener listener)
Subscribe to Sensor data changes and events on all children of a given Entity, supplying the SensorEventListener to invoke when they occur. |
SubscriptionHandle
|
subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
@see #subscribeToChildren(Map, Entity, Sensor, SensorEventListener) |
SubscriptionHandle
|
subscribeToMembers(java.util.Map flags, Group parent, Sensor sensor, SensorEventListener listener)
Subscribe to Sensor data changes and events on all members of a given Group, supplying the SensorEventListener to invoke when they occur. |
SubscriptionHandle
|
subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)
@see #subscribeToChildren(Map, Group, Sensor, SensorEventListener) |
boolean
|
unsubscribe(SubscriptionHandle subscriptionId)
Unsubscribe the given subscription id. |
Method Detail |
---|
public java.util.Set getSubscriptionsForEntitySensor(Entity source, Sensor sensor)
public java.util.Set getSubscriptionsForSubscriber(java.lang.Object subscriber)
public void publish(SensorEvent event)
public SubscriptionHandle subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)
The listener callback is in-order single-threaded and synchronized on this object. The flags parameters can include the following:
flags
- optional parameters to be associated with the subscriptionproducer
- entity to listen tosensor
- sensor channel of events to listen tolistener
- callback to invoke when an event occurs
public SubscriptionHandle subscribe(Entity parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToChildren(java.util.Map flags, Entity parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToMembers(java.util.Map flags, Group parent, Sensor sensor, SensorEventListener listener)
public SubscriptionHandle subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)
public boolean unsubscribe(SubscriptionHandle subscriptionId)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.