Brooklyn

brooklyn.management.internal
[Java] Class AbstractSubscriptionManager

java.lang.Object
  brooklyn.management.internal.AbstractSubscriptionManager
All Implemented Interfaces:
SubscriptionManager

public abstract class AbstractSubscriptionManager

Nested Class Summary
static class AbstractSubscriptionManager.EntitySensorToken

 
Method Summary
protected java.lang.Object getSubscriber(java.util.Map flags, Subscription s)

void publish(SensorEvent event)

performs the actual publishing -- ie distribution to subscriptions

protected SubscriptionHandle subscribe(java.util.Map flags, Subscription s)

performs the actual subscription; should return the subscription parameter as the handle

SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)

@see SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)

SubscriptionHandle subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)

This implementation handles the following flags, in addition to those described in the SubscriptionManager interface:

  • subscriberExecutionManagerTag - a tag to pass to execution manager (without setting any execution semantics / TaskPreprocessor); if not supplied and there is a subscriber, this will be inferred from the subscriber and set up with SingleThreadedScheduler (supply this flag with value null to prevent any task preprocessor from being set)
  • eventFilter - a Predicate<SensorEvent> instance to filter what events are delivered

SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)

@see SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener)

SubscriptionHandle subscribeToChildren(java.util.Map flags, Entity parent, Sensor sensor, SensorEventListener listener)

@see SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)

SubscriptionHandle subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)

@see SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener)

SubscriptionHandle subscribeToMembers(java.util.Map flags, Group parent, Sensor sensor, SensorEventListener listener)

@see SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

getSubscriber

protected java.lang.Object getSubscriber(java.util.Map flags, Subscription s)


publish

public void publish(SensorEvent event)
performs the actual publishing -- ie distribution to subscriptions


subscribe

protected SubscriptionHandle subscribe(java.util.Map flags, Subscription s)
performs the actual subscription; should return the subscription parameter as the handle


subscribe

public final SubscriptionHandle subscribe(Entity producer, Sensor sensor, SensorEventListener listener)
See Also:
SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)#subscribe(Map, Entity, Sensor, SensorEventListener)


subscribe

public final SubscriptionHandle subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)
This implementation handles the following flags, in addition to those described in the SubscriptionManager interface:
See Also:
SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)#subscribe(Map, Entity, Sensor, SensorEventListener)


subscribeToChildren

public final SubscriptionHandle subscribeToChildren(Entity parent, Sensor sensor, SensorEventListener listener)
See Also:
SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener)#subscribeToChildren(Map, Entity, Sensor, SensorEventListener)


subscribeToChildren

public final SubscriptionHandle subscribeToChildren(java.util.Map flags, Entity parent, Sensor sensor, SensorEventListener listener)
See Also:
SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)#subscribe(Map, Entity, Sensor, SensorEventListener)


subscribeToMembers

public final SubscriptionHandle subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)
See Also:
SubscriptionManager#subscribeToChildren(Map, Entity, Sensor, SensorEventListener)#subscribeToChildren(Map, Entity, Sensor, SensorEventListener)


subscribeToMembers

public final SubscriptionHandle subscribeToMembers(java.util.Map flags, Group parent, Sensor sensor, SensorEventListener listener)
See Also:
SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)#subscribe(Map, Entity, Sensor, SensorEventListener)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.