Brooklyn

brooklyn.event.feed
[Java] Class AbstractFeed

java.lang.Object
  brooklyn.event.feed.AbstractFeed

public abstract class AbstractFeed

Captures common fields and processes for sensor feeds. These generally poll or subscribe to get sensor values for an entity. They make it easy to poll over http, jmx, etc. Assumes:


Field Summary
protected EntityLocal entity

protected Poller poller

 
Constructor Summary
AbstractFeed(EntityLocal entity)

 
Method Summary
EntityLocal getEntity()

boolean isActivated()

true if everything has been _started_ (or it is starting) but not stopped, even if it is suspended; see also isActive()

boolean isActive()

true iff the feed is running

protected boolean isConnected()

protected void postStop()

For overriding.

protected void preStart()

For overriding.

protected void preStop()

For overriding.

void resume()

resumes this feed if it has been suspended and not stopped

protected void start()

void stop()

void suspend()

suspends this feed (stops the poller, or indicates that the feed should start in a state where the poller is stopped)

 
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()
 

Field Detail

entity

protected final EntityLocal entity


poller

protected final Poller poller


 
Constructor Detail

AbstractFeed

public AbstractFeed(EntityLocal entity)


 
Method Detail

getEntity

public EntityLocal getEntity()


isActivated

public boolean isActivated()
true if everything has been _started_ (or it is starting) but not stopped, even if it is suspended; see also isActive()


isActive

public boolean isActive()
true iff the feed is running


isConnected

protected boolean isConnected()


postStop

protected void postStop()
For overriding.


preStart

protected void preStart()
For overriding.


preStop

protected void preStop()
For overriding.


resume

public void resume()
resumes this feed if it has been suspended and not stopped


start

protected void start()


stop

public void stop()


suspend

public void suspend()
suspends this feed (stops the poller, or indicates that the feed should start in a state where the poller is stopped)


 

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