Brooklyn

brooklyn.management
[Java] Interface SubscriptionContext


public interface SubscriptionContext

This is the context through which an Entity can manage subscriptions.


Method Summary
java.util.Set getSubscriptions()

Return the subscriptions associated with this context

void publish(SensorEvent event)

@see SubscriptionManager#publish(SensorEvent)

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

As SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)#subscribe(Map, Entity, Sensor, SensorEventListener) with default subscription parameters for this context

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

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

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

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

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

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

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

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

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

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

boolean unsubscribe(SubscriptionHandle subscriptionId)

@see SubscriptionManager#unsubscribe(SubscriptionHandle)

int unsubscribeAll()

causes all subscriptions to be deregistered

 

Method Detail

getSubscriptions

public java.util.Set getSubscriptions()
Return the subscriptions associated with this context


publish

public void publish(SensorEvent event)
See Also:
SubscriptionManager#publish(SensorEvent)#publish(SensorEvent)


subscribe

public SubscriptionHandle subscribe(java.util.Map flags, Entity producer, Sensor sensor, SensorEventListener listener)
As SubscriptionManager#subscribe(Map, Entity, Sensor, SensorEventListener)#subscribe(Map, Entity, Sensor, SensorEventListener) with default subscription parameters for this context


subscribe

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


subscribeToChildren

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


subscribeToChildren

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


subscribeToMembers

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


subscribeToMembers

public SubscriptionHandle subscribeToMembers(Group parent, Sensor sensor, SensorEventListener listener)
See Also:
subscribe(Map, Entity, Sensor, SensorEventListener)


unsubscribe

public boolean unsubscribe(SubscriptionHandle subscriptionId)
See Also:
SubscriptionManager#unsubscribe(SubscriptionHandle)#unsubscribe(SubscriptionHandle)


unsubscribeAll

public int unsubscribeAll()
causes all subscriptions to be deregistered
Returns:
number of subscriptions removed


 

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