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
 AccessController getAccessController()
          For controlling access to operations - can be queried to find if an operation is allowed.
 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
 brooklyn.config.StringConfigMap getConfig()
          Returns the ConfigMap (e.g.
 Collection<Entity> getEntities()
          Deprecated. Use getEntityManager().getEntities() instead; deprecated in 0.5
 Entity getEntity(String id)
          Deprecated. Use getEntityManager().getEntity(String) instead; deprecated in 0.5
 DownloadResolverManager getEntityDownloadsManager()
          Returns the DownloadResolverManager for resolving things like which URL to download an installer from.
 EntityDriverManager getEntityDriverFactory()
          Deprecated. since 0.5; use getEntityDriverManager()
 EntityDriverManager getEntityDriverManager()
          Returns the EntityDriverManager entities can use to create drivers.
 EntityManager getEntityManager()
          Returns the EntityManager instance for managing/querying entities.
 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
 LocationManager getLocationManager()
           
 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)
          Deprecated. Use getEntityManager().isManaged(Entity) instead; deprecated in 0.5
 boolean isRunning()
          Whether this management context is still running, or has been terminated.
 void manage(Entity e)
          Deprecated. Use getEntityManager().manage(Entity) instead; deprecated in 0.5
 void unmanage(Entity e)
          Deprecated. Use getEntityManager().unmanage(Entity) instead; deprecated in 0.5
 

Method Detail

getApplications

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


getEntityManager

EntityManager getEntityManager()
Returns the EntityManager instance for managing/querying entities.


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

EntityDriverManager getEntityDriverFactory()
Deprecated. since 0.5; use getEntityDriverManager()


getEntityDriverManager

EntityDriverManager getEntityDriverManager()
Returns the EntityDriverManager entities can use to create drivers. This manager can also be used to programmatically customize which driver type to use for entities in different locations. The default strategy for choosing a driver is to use a naming convention: DriverDependentEntity.getDriverInterface() returns the interface that the driver must implement; its name should end in "Driver". For example, this suffix is replaced with "SshDriver" for SshMachineLocation, for example.


getEntityDownloadsManager

DownloadResolverManager getEntityDownloadsManager()
Returns the DownloadResolverManager for resolving things like which URL to download an installer from. The default DownloadResolverManager will retrieve entity.getAttribute(Attributes.DOWNLOAD_URL), and substitute things like "${version}" etc. However, additional resolvers can be registered to customize this behaviour (e.g. to always go to an enterprise's repository).


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

getConfig

brooklyn.config.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


getEntities

@Deprecated
Collection<Entity> getEntities()
Deprecated. Use getEntityManager().getEntities() instead; deprecated in 0.5

All entities under control of this management plane


getEntity

@Deprecated
Entity getEntity(String id)
Deprecated. Use getEntityManager().getEntity(String) instead; deprecated in 0.5

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


isManaged

@Deprecated
boolean isManaged(Entity entity)
Deprecated. Use getEntityManager().isManaged(Entity) instead; deprecated in 0.5

Whether the entity is under management by this management context


manage

@Deprecated
void manage(Entity e)
Deprecated. Use getEntityManager().manage(Entity) instead; deprecated in 0.5

Manage an entity.


unmanage

@Deprecated
void unmanage(Entity e)
Deprecated. Use getEntityManager().unmanage(Entity) instead; deprecated in 0.5

Unmanage an entity.


getLocationManager

LocationManager getLocationManager()

getAccessController

AccessController getAccessController()
For controlling access to operations - can be queried to find if an operation is allowed. Callers should *not* cache the result of this method, but should instead always call again to get the AccessController.



Copyright © 2013. All Rights Reserved.