TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.hyades.execution.core
Interface IExecutionComponent

All Known Subinterfaces:
IExecutionEnvironment, IExecutor, IExecutorWithProgressMonitorSupport, IRemoteHyadesComponent, ISession
All Known Implementing Classes:
ExecutionComponentImpl, ExecutionComponentSkeleton, ExecutionComponentStub, ExecutionEnvironmentImpl, ExecutionEnvironmentSkeleton, ExecutionEnvironmentStub, ExecutorSkeleton, ExecutorStub, FileManagerImpl, JavaExecutionEnvironment, JavaProcessExecutorSkeleton, JavaProcessExecutorStub, JavaTaskExecutorImpl, JavaTaskExecutorSkeleton, JavaTaskExecutorStub, JavaTaskRemoteHyadesComponentImpl, JavaTaskRemoteHyadesComponentSkeleton, JavaTaskRemoteHyadesComponentStub, ProcessExecutorImpl, SessionImpl, SessionImpl, SessionSkeleton, SessionStub

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.


Field Summary
static int DEAD
           
static int INACTIVE
           
static int NOT_CONFIGURED
           
static int READY
           
static int SUSPENDED
           
 
Method Summary
 void addChild(IExecutionComponent child)
          Add a child
 void addExecutionComponentStateChangeListener(IExecutionComponentStateChangeListener listener)
          Adds an IExecutionComponentStateChangeListener to this IExecutionComponent
 void fireStateChangeEvent(ExecutionComponentStateChangeEvent event)
          Fire a state change event.
 IExecutionComponent getChildById(java.lang.String id)
          Retrieve a child of this IExecutionComponent based upon its ID.
 IExecutionComponent getChildByName(java.lang.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.
 java.lang.String getId()
          All IExecutionComponent instances must have an immutable ID.
 java.lang.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.
 int getState()
           
 java.lang.String getType()
          All IExecutionComponent instances must have an immutable type.
 java.lang.String getVersion()
          Retrieve the version.
 void handleMessage(IControlMessage message)
           
 void init()
          This method should be called by the factory implementations after the object has been created so that it can do some addional setup if necessary.
 void removeChild(IExecutionComponent child)
          Remove a child
 void removeExecutionComponentStateChangeListener(IExecutionComponentStateChangeListener listener)
          Removes an IExecutionComponentStateChangeListener from this IExecutionComponent
 void sendMessage(IControlMessage message)
           
 void setParent(IExecutionComponent parent)
          Sets the container of this IExecutionComponent.
 

Field Detail

INACTIVE

static final int INACTIVE
See Also:
Constant Field Values

NOT_CONFIGURED

static final int NOT_CONFIGURED
See Also:
Constant Field Values

READY

static final int READY
See Also:
Constant Field Values

SUSPENDED

static final int SUSPENDED
See Also:
Constant Field Values

DEAD

static final int DEAD
See Also:
Constant Field Values
Method Detail

init

void init()
This method should be called by the factory implementations after the object has been created so that it can do some addional setup if necessary.


getName

java.lang.String getName()
All IExecutionComponent instances must have an immutable name. Names are user friendly identifiers.

Returns:
the name of the IExecutionComponent

getId

java.lang.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

java.lang.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

java.lang.String getVersion()
Retrieve the version.


getParent

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.


setParent

void setParent(IExecutionComponent parent)
Sets the container of this IExecutionComponent.


getChildren

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.


getChildById

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


getChildByName

IExecutionComponent getChildByName(java.lang.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 -

addChild

void addChild(IExecutionComponent child)
Add a child

Parameters:
child - the child to add

removeChild

void removeChild(IExecutionComponent child)
Remove a child

Parameters:
child - the child to remove

getNode

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

Returns:
the node on which this IExecutionComponent resides

getState

int getState()

addExecutionComponentStateChangeListener

void addExecutionComponentStateChangeListener(IExecutionComponentStateChangeListener listener)
Adds an IExecutionComponentStateChangeListener to this IExecutionComponent

Parameters:
listener - the listener to be informed of state change events.

removeExecutionComponentStateChangeListener

void removeExecutionComponentStateChangeListener(IExecutionComponentStateChangeListener listener)
Removes an IExecutionComponentStateChangeListener from this IExecutionComponent

Parameters:
listener - the listener to be no longer informed of state change events.

fireStateChangeEvent

void fireStateChangeEvent(ExecutionComponentStateChangeEvent event)
Fire a state change event. This should be in the interface because the behaviour of how to fire the event is tightly coupled with the data structure used to hold the listeners.

Parameters:
newState -

handleMessage

void handleMessage(IControlMessage message)
                   throws MessageProcessingException
Throws:
MessageProcessingException

sendMessage

void sendMessage(IControlMessage message)
                 throws MessageDeliveryException
Throws:
MessageDeliveryException

TPTP 4.6.0 Platform Project
Public API Specification