Brooklyn

brooklyn.entity.drivers
[Java] Interface EntityDriverManager

brooklyn.entity.drivers.EntityDriverManager
  brooklyn.entity.drivers.EntityDriverFactory
All Superinterfaces:
EntityDriverFactory

public interface EntityDriverManager
extends EntityDriverFactory

Responsible for creating a driver for a given entity/location. Also used for customizing which type of driver should be used by entities in given locations. The idea is that an entity should not be tightly coupled to a specific driver implementation, so that there is flexibility for driver changes, without changing the entity itself. The advantage is that drivers can easily be reconfigured, replaced or new drivers for different environments can be added, without needing to modify Brooklyn. To obtain an instance of a driver, use build(DriverDependentEntity, Location). This will use the registered driver types, or if one is not registered will fallback to the default strategy.


Method Summary
D build(DriverDependentEntity entity, Location location)

Builds a new EntityDriver for the given entity/location.

void registerDriver(java.lang.Class driverInterface, java.lang.Class locationClazz, java.lang.Class driverClazz)

 
Methods inherited from interface EntityDriverFactory
build
 

Method Detail

build

public D build(DriverDependentEntity entity, Location location)
Builds a new EntityDriver for the given entity/location.
Parameters:
entity - the DriverDependentEntity to create the EntityDriver for.
location - the Location where the DriverDependentEntity is running.
Returns:
the creates EntityDriver.


registerDriver

public void registerDriver(java.lang.Class driverInterface, java.lang.Class locationClazz, java.lang.Class driverClazz)


 

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