TPTP 4.5.0 Platform Project
Public API Specification

org.eclipse.hyades.execution.local
Class JavaTaskExecutorStub

java.lang.Object
  extended by org.eclipse.hyades.execution.local.RemoteObjectStub
      extended by org.eclipse.hyades.execution.local.ExecutionComponentStub
          extended by org.eclipse.hyades.execution.local.ExecutorStub
              extended by org.eclipse.hyades.execution.local.JavaTaskExecutorStub
All Implemented Interfaces:
IExecutionComponent, IExecutor, IExecutorWithProgressMonitorSupport, IRemoteObject

public class JavaTaskExecutorStub
extends ExecutorStub

In addition to providing remote execution semantics for the methods of the "java task executor" (JavaTaskExecutorImpl), instances of this class establish the local portion of the test monitoring and control agent.


Field Summary
 
Fields inherited from class org.eclipse.hyades.execution.local.ExecutorStub
dataProcessors
 
Fields inherited from interface org.eclipse.hyades.execution.core.IExecutor
CONTROL_EVENT_RESUME, CONTROL_EVENT_SUSPEND
 
Fields inherited from interface org.eclipse.hyades.execution.core.IExecutionComponent
DEAD, INACTIVE, NOT_CONFIGURED, READY, SUSPENDED
 
Constructor Summary
JavaTaskExecutorStub()
           
JavaTaskExecutorStub(IExecutionComponent delegate)
           
 
Method Summary
 void addChild(IExecutionComponent child)
          Add special semantics for JavaTaskRemoteHyadesComponents that are added as children.
 IExecutableObject getCompatibleExecutableObject(java.lang.String classname)
          Create an IExecutableObject instance that is compatible with this executor.
 void init()
          Set up communication with the remote test agent.
 void launch()
          Launches the executable on this ISession's node
 java.lang.String performControlEvent(java.lang.String controlEvent, java.lang.String[] params)
          Performs the control event specified.
 void sendMessage(IControlMessage message)
          This method is implemented at the stub level.
 boolean supportsControlEvent(java.lang.String controlEvent)
          Returns a boolean specifying whether the control event specified is supported.
 
Methods inherited from class org.eclipse.hyades.execution.local.ExecutorStub
getCommunicationPort, getDataProcessors, getExecutableObject, getExecutionResultLocation, getExecutionResultName, getPid, getProcessConsole, kill, kill, launch, setCommunicationPort, setDataProcessors, setExecutableObject, setExecutionResultLocation, setExecutionResultName
 
Methods inherited from class org.eclipse.hyades.execution.local.ExecutionComponentStub
addExecutionComponentStateChangeListener, fireStateChangeEvent, getChildById, getChildByName, getChildren, getId, getName, getNode, getParent, getState, getType, getVersion, handleMessage, removeChild, removeExecutionComponentStateChangeListener, setParent
 
Methods inherited from class org.eclipse.hyades.execution.local.RemoteObjectStub
delegateRemoteCall, getDelegate, getSessionContext, getUniqueId, setDelegate, setSessionContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.hyades.execution.core.IExecutionComponent
addExecutionComponentStateChangeListener, fireStateChangeEvent, getChildById, getChildByName, getChildren, getId, getName, getNode, getParent, getState, getType, getVersion, handleMessage, removeChild, removeExecutionComponentStateChangeListener, setParent
 

Constructor Detail

JavaTaskExecutorStub

public JavaTaskExecutorStub()

JavaTaskExecutorStub

public JavaTaskExecutorStub(IExecutionComponent delegate)
Method Detail

launch

public void launch()
            throws ExecutionComponentStateException
Description copied from interface: IExecutor
Launches the executable on this ISession's node

Specified by:
launch in interface IExecutor
Overrides:
launch in class ExecutorStub
Throws:
ExecutionComponentStateException - if the test monitoring and control agent is not active
See Also:
IExecutor.launch()

getCompatibleExecutableObject

public IExecutableObject getCompatibleExecutableObject(java.lang.String classname)
                                                throws java.lang.ClassNotFoundException
Description copied from class: ExecutorStub
Create an IExecutableObject instance that is compatible with this executor. The implementation of this method differs from the norm, as no responsibilities are delegated to the delegate object. Instead, the creation of the executable object is handled completely by the stub/skeleton combination.

Specified by:
getCompatibleExecutableObject in interface IExecutor
Overrides:
getCompatibleExecutableObject in class ExecutorStub
Returns:
an IJavaTaskExecutableObjectStub
Throws:
java.lang.ClassNotFoundException
See Also:
IExecutor.getCompatibleExecutableObject(java.lang.String)

init

public void init()
Set up communication with the remote test agent. The local portion of the agent is created here.

Specified by:
init in interface IExecutionComponent
Specified by:
init in interface IRemoteObject
Overrides:
init in class ExecutionComponentStub
See Also:
IRemoteObject.init()

sendMessage

public void sendMessage(IControlMessage message)
                 throws MessageDeliveryException
This method is implemented at the stub level. Currently, the only message handled is the START_TEST message.

Specified by:
sendMessage in interface IExecutionComponent
Overrides:
sendMessage in class ExecutionComponentStub
Throws:
MessageDeliveryException
See Also:
IExecutionComponent.sendMessage(org.eclipse.hyades.execution.core.IControlMessage)

addChild

public void addChild(IExecutionComponent child)
Add special semantics for JavaTaskRemoteHyadesComponents that are added as children. When a JavaTaskRemoteHyadesComponent is added as a child, a reference the test monitoring and control agent is passed to the new child, enabling it to fulfill monitoring requests.

Specified by:
addChild in interface IExecutionComponent
Overrides:
addChild in class ExecutionComponentStub
Parameters:
child - the child to add
See Also:
IExecutionComponent.addChild(org.eclipse.hyades.execution.core.IExecutionComponent)

supportsControlEvent

public boolean supportsControlEvent(java.lang.String controlEvent)
Description copied from interface: IExecutor
Returns a boolean specifying whether the control event specified is supported.

Parameters:
controlEvent - Contol Event in question.
Returns:
Specifies whether the control event is supported.

performControlEvent

public java.lang.String performControlEvent(java.lang.String controlEvent,
                                            java.lang.String[] params)
Description copied from interface: IExecutor
Performs the control event specified.

Parameters:
controlEvent - Contol Event to perform.
Returns:
Error Message if error occurred. Otherwise null.

TPTP 4.5.0 Platform Project
Public API Specification