org.eclipse.hyades.execution.core
Interface IExecutionComponent

All Known Subinterfaces:
IExecutionEnvironment, IExecutor, IRemoteHyadesComponent, ISession

public interface IExecutionComponent

IExecutionComponent is the base class for all of the components in the runtime system. IExecutionComponent's are structured as a tree with the specialized ISession is the root of the tree on the workbench side.

IExecutionComponent's are uniquely identified at runtime with an ID. They are also named and typed but names and types are not guaranteed to be unique. Version support is provided as well.

IExecutionComponent's have at least four states. They can be inactive, ready, suspended, or dead.

Version:
0.0.2

Method Summary
 void addChild(String id, String name, String type)
          Add a child
 IExecutionComponent createChild(String id, String name, String type)
          Create an child
 IExecutionComponent getChildById(String id)
          Retrieve a child of this IExecutionComponent based upon its ID.
 IExecutionComponent getChildByName(String name)
          Retrieve a child of this IExecutionComponent based upon its name.
 IExecutionComponent[] getChildren()
          Get the first-level children that reside under this IExecutionComponent The typical heirarchy is a follows: ISession->IExecutor->IRemoteHyadesComponent It is possible, however, to have any level of nesting here.
 IExecutionComponent[] getChildren(String type)
          Retrieve all of the first-level children of a specific type.
 IExecutionComponent[] getChildren(String type, int state)
          Retrieve all of the first-level children of a specific type in the specified state.
 String getId()
          All IExecutionComponent instances must have an immutable ID.
 String getName()
          All IExecutionComponent instances must have an immutable name.
 INode getNode()
          Get the node on which this IExecutionComponent resides.
 IExecutionComponent getParent()
          Get the container where this IExecutionComponent is hosted.
 String getType()
          All IExecutionComponent instances must have an immutable type.
 String getVersion()
          Retrieve the version.
 boolean isDead()
          Whether this IExecutionComponent is in the dead state
 boolean isInactive()
          Whether this IExecutionComponent is in the inactive state
 boolean isReady()
          Whether this IExecutionComponent is in the ready state
 boolean isSuspended()
          Whether this IExecutionComponent is in the suspend state
 

Method Detail

getName

public String getName()
All IExecutionComponent instances must have an immutable name. Names are user friendly identifiers.
Returns:
the name of the IExecutionComponent

getId

public String getId()
All IExecutionComponent instances must have an immutable ID. Id's are globaly unique values that identify this unique IExecutionComponent runtime instance.
Returns:
The ID of the IExecutionComponent

getType

public String getType()
All IExecutionComponent instances must have an immutable type. The type field is intended to allow you to identify groups of IExecutionComponent instances as having the same behaviour.
Returns:
the type of the IExecutionComponent

getVersion

public String getVersion()
Retrieve the version.

getParent

public IExecutionComponent getParent()
Get the container where this IExecutionComponent is hosted. The typical heirarchy is a follows: ISession->IExecutor->IRemoteHyadesComponent It is possible, however, to have any level of nesting here. The ISession is always the root.

getChildren

public IExecutionComponent[] getChildren()
Get the first-level children that reside under this IExecutionComponent The typical heirarchy is a follows: ISession->IExecutor->IRemoteHyadesComponent It is possible, however, to have any level of nesting here. The ISession is always the root.

getChildren

public IExecutionComponent[] getChildren(String type)
Retrieve all of the first-level children of a specific type.

getChildren

public IExecutionComponent[] getChildren(String type,
                                         int state)
Retrieve all of the first-level children of a specific type in the specified state.

getChildById

public IExecutionComponent getChildById(String id)
Retrieve a child of this IExecutionComponent based upon its ID.

getChildByName

public IExecutionComponent getChildByName(String name)
Retrieve a child of this IExecutionComponent based upon its name. RKD: This may not be the best idea due to name collision issues. probably want to stick to just ID's.
Parameters:
name -  

createChild

public IExecutionComponent createChild(String id,
                                       String name,
                                       String type)
Create an child
Parameters:
id - ID of the child IExecutionComponent
name - Name of the child IExecutionComponent
type - Type of the child IExecutionComponent
Returns:
the child IExecutionComponent

addChild

public void addChild(String id,
                     String name,
                     String type)
Add a child
Parameters:
id - ID of the child IExecutionComponent
name - Name of the child IExecutionComponent
type - Type of the child IExecutionComponent

getNode

public INode getNode()
Get the node on which this IExecutionComponent resides.
Returns:
the node on which this IExecutionComponent resides

isInactive

public boolean isInactive()
Whether this IExecutionComponent is in the inactive state

isReady

public boolean isReady()
Whether this IExecutionComponent is in the ready state

isSuspended

public boolean isSuspended()
Whether this IExecutionComponent is in the suspend state

isDead

public boolean isDead()
Whether this IExecutionComponent is in the dead state