TPTP 4.6.0 Platform Project
Internal API Specification

org.eclipse.hyades.internal.execution.local.control
Interface Process

All Known Implementing Classes:
AgentDiscovererDelegateHelper.CustomProcess, ProcessImpl

public interface Process


Method Summary
 void addEnvironmentVariable(Variable variable)
          Adds an environment variable to this process.
 void addProcessListener(ProcessListener listener)
          Adds a ProcessListener to this Process instance.
 Agent getAgent(java.lang.String name)
          Retrieves an agent based upon it's name
 java.util.Enumeration getAgentsByType(java.lang.String type)
          Provides an enumeration of all the agents of a specific type that are assciated with this Process.
 Console getConsole()
          Retrieves the console of this Process instance.
 java.util.Enumeration getEnvironment()
          Provides an enumeration of each Variabe comprising the entire environment of this process.
 Variable getEnvironmentVariable(java.lang.String name)
          Retrieves an environment variable from this process.
 java.lang.String getExecutable()
          Get the exectable name for this process.
 java.lang.String getName()
          Retrieves the name of this process as provided by Process#setName()
 Node getNode()
          Retrieves the Node that this Process instance is associated with.
 java.lang.String getParameters()
          Retrieves the parameters of the process.
 java.lang.String getProcessId()
          Retrieve the process ID (pid) for this process
 java.lang.String getUUID()
          Retrieves the uuid of this process if it is known, null otherwise.
 boolean isActive()
           
 void kill(long delay)
          Kills this process if it is active.
 void launch()
          Launches the process on the node that was provided to the ProcessFactory during construction of this Process instance.
 java.util.Enumeration listAgents()
          Provides an Enumeration of all the Agents associated with this Process instance.
 void removeEnvironmentVariable(Variable variable)
          Removes an environment variable from this process.
 void removeProcessListener(ProcessListener listener)
          Removes a ProcessListener from this Process instance.
 void setActive(boolean isActive)
           
 void setExecutable(java.lang.String exe)
          Set the exectauble name for this process.
 void setLocation(java.lang.String location)
          Set's the home directory of the process.
 void setName(java.lang.String name)
          Save a user friendly name so that it can be retrieved later via Process#getName()
 void setParameters(java.lang.String parameters)
          Set the parameters for this process
 void setProcessId(java.lang.String pid)
           
 void setUUID(java.lang.String uuid)
           
 Agent waitForAgent(java.lang.String agentType, java.lang.String agentName, int timeout)
          Blocks calling thread until the agent is retrieved, if the agent cannot be retrieved within the timeout period, null is returned for the agent return value.
 

Method Detail

launch

void launch()
            throws ProcessActiveException,
                   NotConnectedException,
                   NoSuchApplicationException
Launches the process on the node that was provided to the ProcessFactory during construction of this Process instance. If the Process was already launched the ProcessActiveException is thrown.

Throws:
ProcessActiveException
NotConnectedException
NoSuchApplicationException

kill

void kill(long delay)
          throws InactiveProcessException,
                 NotConnectedException
Kills this process if it is active.

Throws:
InactiveProcessException
NotConnectedException

listAgents

java.util.Enumeration listAgents()
Provides an Enumeration of all the Agents associated with this Process instance.

See Also:
Agent

getAgent

Agent getAgent(java.lang.String name)
Retrieves an agent based upon it's name

Returns:
the agent with the specified name if it exists, null otherwise
See Also:
Agent

getAgentsByType

java.util.Enumeration getAgentsByType(java.lang.String type)
Provides an enumeration of all the agents of a specific type that are assciated with this Process.


addProcessListener

void addProcessListener(ProcessListener listener)
Adds a ProcessListener to this Process instance.

See Also:
ProcessListener

removeProcessListener

void removeProcessListener(ProcessListener listener)
Removes a ProcessListener from this Process instance.

See Also:
ProcessListener

getNode

Node getNode()
             throws InactiveProcessException
Retrieves the Node that this Process instance is associated with.

Throws:
InactiveProcessException
See Also:
Node

setName

void setName(java.lang.String name)
Save a user friendly name so that it can be retrieved later via Process#getName()


getName

java.lang.String getName()
Retrieves the name of this process as provided by Process#setName()


getUUID

java.lang.String getUUID()
Retrieves the uuid of this process if it is known, null otherwise.


setUUID

void setUUID(java.lang.String uuid)

setExecutable

void setExecutable(java.lang.String exe)
                   throws ProcessActiveException
Set the exectauble name for this process.

Throws:
ProcessActiveException

getExecutable

java.lang.String getExecutable()
Get the exectable name for this process.


getProcessId

java.lang.String getProcessId()
                              throws InactiveProcessException
Retrieve the process ID (pid) for this process

Throws:
InactiveProcessException

setProcessId

void setProcessId(java.lang.String pid)

isActive

boolean isActive()

setActive

void setActive(boolean isActive)

getConsole

Console getConsole()
Retrieves the console of this Process instance.


addEnvironmentVariable

void addEnvironmentVariable(Variable variable)
                            throws ProcessActiveException
Adds an environment variable to this process.

Throws:
ProcessActiveException

getEnvironmentVariable

Variable getEnvironmentVariable(java.lang.String name)
Retrieves an environment variable from this process.

Returns:
the environment variable with the specified name attribute if it exists, null otherwise.

removeEnvironmentVariable

void removeEnvironmentVariable(Variable variable)
                               throws ProcessActiveException
Removes an environment variable from this process.

Throws:
ProcessActiveException

getEnvironment

java.util.Enumeration getEnvironment()
Provides an enumeration of each Variabe comprising the entire environment of this process.

See Also:
Variable

setParameters

void setParameters(java.lang.String parameters)
                   throws ProcessActiveException
Set the parameters for this process

Throws:
ProcessActiveException

getParameters

java.lang.String getParameters()
Retrieves the parameters of the process.


setLocation

void setLocation(java.lang.String location)
                 throws ProcessActiveException
Set's the home directory of the process.

Throws:
ProcessActiveException

waitForAgent

Agent waitForAgent(java.lang.String agentType,
                   java.lang.String agentName,
                   int timeout)
                   throws NotConnectedException,
                          InactiveProcessException
Blocks calling thread until the agent is retrieved, if the agent cannot be retrieved within the timeout period, null is returned for the agent return value.

Parameters:
agentType - the type of agent qualified the selection
agentName - the name of the agent to wait for
timeout - the maximum time to wait for the agent to be retrieved
Returns:
the agent retrieved or null if the timeout is reached before the agent is found
Throws:
NotConnectedException
InactiveProcessException

TPTP 4.6.0 Platform Project
Internal API Specification