TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.hyades.execution.core.impl
Class ExecutionComponentImpl

java.lang.Object
  extended by org.eclipse.hyades.execution.core.impl.ExecutionComponentImpl
All Implemented Interfaces:
IExecutionComponent
Direct Known Subclasses:
ExecutionEnvironmentImpl, FileManagerImpl, JavaTaskExecutorImpl, JavaTaskRemoteHyadesComponentImpl, ProcessExecutorImpl, SessionImpl, SessionImpl

public abstract class ExecutionComponentImpl
extends java.lang.Object
implements IExecutionComponent


Field Summary
 
Fields inherited from interface org.eclipse.hyades.execution.core.IExecutionComponent
DEAD, INACTIVE, NOT_CONFIGURED, READY, SUSPENDED
 
Constructor Summary
ExecutionComponentImpl()
           
 
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)
          This is a default impementation which does not handle any messages directly and will always throw a MessageProcessingException.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionComponentImpl

public ExecutionComponentImpl()
Method Detail

init

public void init()
Description copied from interface: IExecutionComponent
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.

Specified by:
init in interface IExecutionComponent
See Also:
IExecutionComponent.init()

getName

public java.lang.String getName()
Description copied from interface: IExecutionComponent
All IExecutionComponent instances must have an immutable name. Names are user friendly identifiers.

Specified by:
getName in interface IExecutionComponent
Returns:
the name of the IExecutionComponent
See Also:
IExecutionComponent.getName()

getId

public java.lang.String getId()
Description copied from interface: IExecutionComponent
All IExecutionComponent instances must have an immutable ID. Id's are globaly unique values that identify this unique IExecutionComponent runtime instance.

Specified by:
getId in interface IExecutionComponent
Returns:
The ID of the IExecutionComponent
See Also:
IExecutionComponent.getId()

getType

public java.lang.String getType()
Description copied from interface: IExecutionComponent
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.

Specified by:
getType in interface IExecutionComponent
Returns:
the type of the IExecutionComponent
See Also:
IExecutionComponent.getType()

getVersion

public java.lang.String getVersion()
Description copied from interface: IExecutionComponent
Retrieve the version.

Specified by:
getVersion in interface IExecutionComponent
See Also:
IExecutionComponent.getVersion()

getParent

public IExecutionComponent getParent()
Description copied from interface: IExecutionComponent
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.

Specified by:
getParent in interface IExecutionComponent
See Also:
IExecutionComponent.getParent()

setParent

public void setParent(IExecutionComponent parent)
Description copied from interface: IExecutionComponent
Sets the container of this IExecutionComponent.

Specified by:
setParent in interface IExecutionComponent
See Also:
IExecutionComponent.setParent(org.eclipse.hyades.execution.core.IExecutionComponent)

getChildren

public IExecutionComponent[] getChildren()
Description copied from interface: IExecutionComponent
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.

Specified by:
getChildren in interface IExecutionComponent
See Also:
IExecutionComponent.getChildren()

getChildById

public IExecutionComponent getChildById(java.lang.String id)
Description copied from interface: IExecutionComponent
Retrieve a child of this IExecutionComponent based upon its ID.

Specified by:
getChildById in interface IExecutionComponent
See Also:
IExecutionComponent.getChildById(java.lang.String)

getChildByName

public IExecutionComponent getChildByName(java.lang.String name)
Description copied from interface: IExecutionComponent
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.

Specified by:
getChildByName in interface IExecutionComponent
See Also:
IExecutionComponent.getChildByName(java.lang.String)

addChild

public void addChild(IExecutionComponent child)
Description copied from interface: IExecutionComponent
Add a child

Specified by:
addChild in interface IExecutionComponent
Parameters:
child - the child to add
See Also:
org.eclipse.hyades.execution.core.IExecutionComponent#addChild(java.lang.String, java.lang.String, java.lang.String)

getNode

public INode getNode()
Description copied from interface: IExecutionComponent
Get the node on which this IExecutionComponent resides.

Specified by:
getNode in interface IExecutionComponent
Returns:
the node on which this IExecutionComponent resides
See Also:
IExecutionComponent.getNode()

getState

public int getState()
Specified by:
getState in interface IExecutionComponent
See Also:
IExecutionComponent.getState()

addExecutionComponentStateChangeListener

public void addExecutionComponentStateChangeListener(IExecutionComponentStateChangeListener listener)
Description copied from interface: IExecutionComponent
Adds an IExecutionComponentStateChangeListener to this IExecutionComponent

Specified by:
addExecutionComponentStateChangeListener in interface IExecutionComponent
Parameters:
listener - the listener to be informed of state change events.
See Also:
IExecutionComponent.addExecutionComponentStateChangeListener(org.eclipse.hyades.execution.core.IExecutionComponentStateChangeListener)

removeExecutionComponentStateChangeListener

public void removeExecutionComponentStateChangeListener(IExecutionComponentStateChangeListener listener)
Description copied from interface: IExecutionComponent
Removes an IExecutionComponentStateChangeListener from this IExecutionComponent

Specified by:
removeExecutionComponentStateChangeListener in interface IExecutionComponent
Parameters:
listener - the listener to be no longer informed of state change events.
See Also:
IExecutionComponent.removeExecutionComponentStateChangeListener(org.eclipse.hyades.execution.core.IExecutionComponentStateChangeListener)

fireStateChangeEvent

public void fireStateChangeEvent(ExecutionComponentStateChangeEvent event)
Description copied from interface: IExecutionComponent
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.

Specified by:
fireStateChangeEvent in interface IExecutionComponent
See Also:
IExecutionComponent.fireStateChangeEvent(org.eclipse.hyades.execution.core.ExecutionComponentStateChangeEvent)

handleMessage

public void handleMessage(IControlMessage message)
                   throws MessageProcessingException
This is a default impementation which does not handle any messages directly and will always throw a MessageProcessingException. Subclasses should provide their own implementations and if they do not know how to deal with the message should delegate the call to the superclass.

Specified by:
handleMessage in interface IExecutionComponent
Throws:
MessageProcessingException
See Also:
IExecutionComponent.handleMessage(org.eclipse.hyades.execution.core.IControlMessage)

sendMessage

public void sendMessage(IControlMessage message)
                 throws MessageDeliveryException
Specified by:
sendMessage in interface IExecutionComponent
Throws:
MessageDeliveryException
See Also:
IExecutionComponent.sendMessage(org.eclipse.hyades.execution.core.IControlMessage)

removeChild

public void removeChild(IExecutionComponent child)
Description copied from interface: IExecutionComponent
Remove a child

Specified by:
removeChild in interface IExecutionComponent
Parameters:
child - the child to remove
See Also:
IExecutionComponent.removeChild(org.eclipse.hyades.execution.core.IExecutionComponent)

TPTP 4.6.0 Platform Project
Public API Specification