Brooklyn

brooklyn.entity.basic
[Java] Interface SoftwareProcessDriver

brooklyn.entity.basic.SoftwareProcessDriver
  brooklyn.entity.drivers.EntityDriver
All Superinterfaces:
EntityDriver

public interface SoftwareProcessDriver
extends EntityDriver

The EntityDriver for a SoftwareProcess.

In many cases it is cleaner to store entity lifecycle effectors (and sometimes other implementations) in a class to which the entity delegates. Classes implementing this interface provide this delegate, often inheriting utilities specific to a particular transport (e.g. ssh) shared among many different entities.

In this way, it is also possible for entities to cleanly support multiple mechanisms for start/stop and other methods.


Method Summary
EntityLocal getEntity()

The entity whose components we are controlling.

boolean isRunning()

Whether the entity components have started.

void kill()

Kills the process, ungracefully and immediately where possible (e.g. with `kill -9`).

void rebind()

Rebinds the driver to a pre-existing software process.

void restart()

Performs software restart (or queues tasks to do this).

void start()

Performs software start (or queues tasks to do this)

void stop()

Performs software stop (or queues tasks to do this)

 
Methods inherited from interface EntityDriver
getEntity, getLocation
 

Method Detail

getEntity

public EntityLocal getEntity()
The entity whose components we are controlling.


isRunning

public boolean isRunning()
Whether the entity components have started.


kill

public void kill()
Kills the process, ungracefully and immediately where possible (e.g. with `kill -9`).


rebind

public void rebind()
Rebinds the driver to a pre-existing software process.


restart

public void restart()
Performs software restart (or queues tasks to do this). Unlike stop/start implementations here are expected to update SERVICE_STATE for STOPPING and STARTING as appropriate (but framework will set RUNNING afterwards, after detecting it is running).
See Also:
Startable#restart()#restart()


start

public void start()
Performs software start (or queues tasks to do this)


stop

public void stop()
Performs software stop (or queues tasks to do this)
See Also:
Startable#stop()#stop()


 

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