brooklyn.management
Interface ManagementContext


public interface ManagementContext

This is the entry point for accessing and interacting with a realm of applications and their entities in Brooklyn. For example, policies and the management console(s) (web-app, etc) can use this to interact with entities; policies, web-app, and entities share the realm for subscribing to events, executing tasks, and generally co-existing.

It may refer to several applications, and it refers to all the entities descended from those applications.


Method Summary
 Collection<Application> getApplications()
          All applications under control of this management plane
 BrooklynCatalog getCatalog()
          Record of configured Brooklyn entities (and templates and policies) which can be loaded
 StringConfigMap getConfig()
          Returns the ConfigMap (e.g.
 Collection<Entity> getEntities()
          All entities under control of this management plane
 Entity getEntity(String id)
          Returns the entity with the given identifier (may be a full instance, or a proxy to one which is remote)
 EntityDriverFactory getEntityDriverFactory()
          Returns the EntityDriverFactory entities can use to create drivers.
 ExecutionContext getExecutionContext(Entity entity)
          Returns an ExecutionContext instance representing tasks (from the ExecutionManager) associated with this entity, and capable of conveniently running such tasks which will be associated with that entity
 ExecutionManager getExecutionManager()
          Returns the ExecutionManager instance for entities and users in this management realm to submit tasks and to observe what tasks are occurring
 LocationRegistry getLocationRegistry()
          Record of configured locations and location resolvers
 RebindManager getRebindManager()
           
 SubscriptionContext getSubscriptionContext(Entity entity)
          Returns a SubscriptionContext instance representing subscriptions (from the SubscriptionManager) associated with this entity, and capable of conveniently subscribing on behalf of that entity
 SubscriptionManager getSubscriptionManager()
          Returns the SubscriptionManager instance for entities and users of this management realm to subscribe to sensor events (and, in the case of entities, to emit sensor events)
 boolean isManaged(Entity entity)
          whether the entity is under management by this management context
 boolean isRunning()
          Whether this management context is still running, or has been terminated.
 void manage(Entity e)
          Manage an entity.
 void unmanage(Entity e)
          Unmanage an entity.
 

Method Detail

getApplications

Collection<Application> getApplications()
All applications under control of this management plane


getEntities

Collection<Entity> getEntities()
All entities under control of this management plane


getEntity

Entity getEntity(String id)
Returns the entity with the given identifier (may be a full instance, or a proxy to one which is remote)


isManaged

boolean isManaged(Entity entity)
whether the entity is under management by this management context


getExecutionManager

ExecutionManager getExecutionManager()
Returns the ExecutionManager instance for entities and users in this management realm to submit tasks and to observe what tasks are occurring


getEntityDriverFactory

EntityDriverFactory getEntityDriverFactory()
Returns the EntityDriverFactory entities can use to create drivers.

Returns:
the EntityDriverFactory to use.

getSubscriptionManager

SubscriptionManager getSubscriptionManager()
Returns the SubscriptionManager instance for entities and users of this management realm to subscribe to sensor events (and, in the case of entities, to emit sensor events)


getExecutionContext

ExecutionContext getExecutionContext(Entity entity)
Returns an ExecutionContext instance representing tasks (from the ExecutionManager) associated with this entity, and capable of conveniently running such tasks which will be associated with that entity


getSubscriptionContext

SubscriptionContext getSubscriptionContext(Entity entity)
Returns a SubscriptionContext instance representing subscriptions (from the SubscriptionManager) associated with this entity, and capable of conveniently subscribing on behalf of that entity


getRebindManager

RebindManager getRebindManager()

manage

void manage(Entity e)
Manage an entity.


unmanage

void unmanage(Entity e)
Unmanage an entity.


getConfig

StringConfigMap getConfig()
Returns the ConfigMap (e.g. BrooklynProperties) applicable to this management context. Defaults to reading ~/.brooklyn/brooklyn.properties but configurable in the management context.


isRunning

boolean isRunning()
Whether this management context is still running, or has been terminated.


getLocationRegistry

LocationRegistry getLocationRegistry()
Record of configured locations and location resolvers


getCatalog

BrooklynCatalog getCatalog()
Record of configured Brooklyn entities (and templates and policies) which can be loaded



Copyright © 2013. All Rights Reserved.