org.eclipse.tptp.platform.execution.client.core.internal
Class AgentController
java.lang.Object
org.eclipse.tptp.platform.execution.client.core.internal.AgentController
- All Implemented Interfaces:
- org.eclipse.tptp.platform.execution.client.core.IAgentController, org.eclipse.tptp.platform.execution.util.ICommandHandler
- public class AgentController
- extends java.lang.Object
- implements org.eclipse.tptp.platform.execution.client.core.IAgentController, org.eclipse.tptp.platform.execution.util.ICommandHandler
|
Constructor Summary |
AgentController(org.eclipse.tptp.platform.execution.client.core.INode node,
org.eclipse.tptp.platform.execution.client.core.ConnectionInfo conninfo)
|
|
Method Summary |
int |
addDataListener(int dataConnID,
org.eclipse.tptp.platform.execution.client.core.IDataProcessor dataProcessor)
|
int |
addEventListener(java.lang.String interfaceID,
org.eclipse.tptp.platform.execution.util.ICommandHandler eventHandler)
|
boolean |
authenticateUser(org.eclipse.tptp.platform.execution.security.User user)
|
int |
createDataConnection(int direction)
|
org.eclipse.tptp.platform.execution.client.core.IProcess |
createProcess()
|
org.eclipse.tptp.platform.execution.client.core.IProcess |
createProcess(java.lang.String executable)
|
org.eclipse.tptp.platform.execution.client.core.IProcess |
createProcess(java.lang.String executable,
java.lang.String parameters)
|
void |
disconnect()
|
org.eclipse.tptp.platform.execution.client.agent.IAgent |
getAgent(java.lang.String agentName,
long processId)
Returns the instance of IAgent matching the parameter processId |
org.eclipse.tptp.platform.execution.client.agent.IAgent |
getAgent(java.lang.String agentName,
java.lang.String agentClassName)
|
org.eclipse.tptp.platform.execution.client.agent.IAgent |
getAgent(java.lang.String agentName,
java.lang.String agentClassName,
long processId)
|
org.eclipse.tptp.platform.execution.client.agent.IAgent |
getAgent(java.lang.String agentName,
java.lang.String agentClassName,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
|
org.eclipse.tptp.platform.execution.client.agent.IAgent |
getAgent(java.lang.String agentName,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
|
int |
getAgentByID(int agentID,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
|
int |
getAgentByToken(int token,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
|
java.lang.String |
getAgentMetadata(java.lang.String agentName)
|
IConnection |
getConnection()
|
org.eclipse.tptp.platform.execution.client.core.ConnectionInfo |
getConnectionInfo()
|
int |
getConsoleDataConnection(int direction)
|
ConsoleDataProcessor |
getConsoleMapper()
|
org.eclipse.tptp.platform.execution.client.core.IFileTransferManager |
getFileTransferManager()
|
long |
getNextContextId()
|
org.eclipse.tptp.platform.execution.client.core.INode |
getNode()
|
org.eclipse.tptp.platform.execution.client.core.IProcess |
getProcess(long processId)
|
org.eclipse.tptp.platform.execution.security.ISecureClientParameters |
getSecurityParameters()
|
org.eclipse.tptp.platform.execution.security.User |
getUser()
|
java.lang.String |
getVersion()
|
void |
handleRACCommand(org.eclipse.tptp.platform.execution.util.ICommandElement command)
|
void |
incomingCommand(org.eclipse.tptp.platform.execution.client.core.INode node,
org.eclipse.tptp.platform.execution.util.ICommandElement command)
|
java.util.Enumeration |
listAgents()
|
java.util.Enumeration |
listProcesses()
|
java.lang.String[] |
queryAvailableAgents()
|
java.lang.String[] |
queryAvailableAgents(java.lang.String[] interfaceID)
|
org.eclipse.tptp.platform.execution.client.agent.IAgent[] |
queryDeployedAgents(java.lang.String interfaceID)
|
org.eclipse.tptp.platform.execution.client.agent.IAgent[] |
queryRunningAgents()
|
org.eclipse.tptp.platform.execution.client.agent.IAgent[] |
queryRunningAgents(java.lang.String[] interfaceID)
|
org.eclipse.tptp.platform.execution.client.agent.IAgent[] |
queryRunningAgents(java.lang.String agentName,
java.lang.String[] interfaceID,
long pid)
|
void |
releaseAgent(int agentID)
|
void |
releaseAgentControl(int agentID)
|
void |
removeEventListener(java.lang.String interfaceID,
org.eclipse.tptp.platform.execution.util.ICommandHandler eventHandler)
|
boolean |
requestAgentControl(int agentID,
int accessMode)
|
void |
sendCommand(java.lang.String cmd,
int destID,
org.eclipse.tptp.platform.execution.util.ICommandHandler handler)
|
int |
sendData(int dataConnID,
byte[] buffer,
int bufferLength)
|
void |
sendMessage(IControlMessage mesg,
org.eclipse.tptp.platform.execution.util.ICommandHandler handler)
Sends a command to the specified destination, the command requires a control message object
and a commandhandler |
void |
setConnection(IConnection conn)
|
void |
setNewACType(boolean newAC)
|
void |
setSecurityParameters(org.eclipse.tptp.platform.execution.security.ISecureClientParameters manager)
|
void |
setUser(org.eclipse.tptp.platform.execution.security.User user)
|
org.eclipse.tptp.platform.execution.client.core.IProcess |
waitForProcess(java.lang.String processIdentity,
int timeout)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_processList
protected java.util.Vector _processList
AgentController
public AgentController(org.eclipse.tptp.platform.execution.client.core.INode node,
org.eclipse.tptp.platform.execution.client.core.ConnectionInfo conninfo)
getNode
public org.eclipse.tptp.platform.execution.client.core.INode getNode()
- Specified by:
getNode in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
setNewACType
public void setNewACType(boolean newAC)
getVersion
public java.lang.String getVersion()
getNextContextId
public long getNextContextId()
- Specified by:
getNextContextId in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
disconnect
public void disconnect()
- Specified by:
disconnect in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
authenticateUser
public boolean authenticateUser(org.eclipse.tptp.platform.execution.security.User user)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
authenticateUser in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgent
public org.eclipse.tptp.platform.execution.client.agent.IAgent getAgent(java.lang.String agentName,
java.lang.String agentClassName)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
getAgent in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgent
public org.eclipse.tptp.platform.execution.client.agent.IAgent getAgent(java.lang.String agentName,
java.lang.String agentClassName,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
getAgent in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
queryDeployedAgents
public org.eclipse.tptp.platform.execution.client.agent.IAgent[] queryDeployedAgents(java.lang.String interfaceID)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgent
public org.eclipse.tptp.platform.execution.client.agent.IAgent getAgent(java.lang.String agentName,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
getAgent in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
releaseAgent
public void releaseAgent(int agentID)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
requestAgentControl
public boolean requestAgentControl(int agentID,
int accessMode)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
releaseAgentControl
public void releaseAgentControl(int agentID)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgentByToken
public int getAgentByToken(int token,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgentByID
public int getAgentByID(int agentID,
org.eclipse.tptp.platform.execution.util.TPTPAgentAccess accessMode)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgent
public org.eclipse.tptp.platform.execution.client.agent.IAgent getAgent(java.lang.String agentName,
long processId)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Returns the instance of IAgent matching the parameter processId
- Specified by:
getAgent in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Returns:
-
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgent
public org.eclipse.tptp.platform.execution.client.agent.IAgent getAgent(java.lang.String agentName,
java.lang.String agentClassName,
long processId)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
getAgent in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
listAgents
public java.util.Enumeration listAgents()
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
listAgents in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
listProcesses
public java.util.Enumeration listProcesses()
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
listProcesses in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getProcess
public org.eclipse.tptp.platform.execution.client.core.IProcess getProcess(long processId)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
getProcess in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
waitForProcess
public org.eclipse.tptp.platform.execution.client.core.IProcess waitForProcess(java.lang.String processIdentity,
int timeout)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException,
org.eclipse.tptp.platform.execution.exceptions.InactiveProcessException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
org.eclipse.tptp.platform.execution.exceptions.InactiveProcessException
queryAvailableAgents
public java.lang.String[] queryAvailableAgents(java.lang.String[] interfaceID)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
queryAvailableAgents in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
queryAvailableAgents
public java.lang.String[] queryAvailableAgents()
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
queryAvailableAgents in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
queryRunningAgents
public org.eclipse.tptp.platform.execution.client.agent.IAgent[] queryRunningAgents(java.lang.String agentName,
java.lang.String[] interfaceID,
long pid)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
queryRunningAgents in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
queryRunningAgents
public org.eclipse.tptp.platform.execution.client.agent.IAgent[] queryRunningAgents(java.lang.String[] interfaceID)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
queryRunningAgents in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
queryRunningAgents
public org.eclipse.tptp.platform.execution.client.agent.IAgent[] queryRunningAgents()
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Specified by:
queryRunningAgents in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getAgentMetadata
public java.lang.String getAgentMetadata(java.lang.String agentName)
throws org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.NotConnectedException
getFileTransferManager
public org.eclipse.tptp.platform.execution.client.core.IFileTransferManager getFileTransferManager()
- Specified by:
getFileTransferManager in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
addEventListener
public int addEventListener(java.lang.String interfaceID,
org.eclipse.tptp.platform.execution.util.ICommandHandler eventHandler)
- Specified by:
addEventListener in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
removeEventListener
public void removeEventListener(java.lang.String interfaceID,
org.eclipse.tptp.platform.execution.util.ICommandHandler eventHandler)
- Specified by:
removeEventListener in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
sendCommand
public void sendCommand(java.lang.String cmd,
int destID,
org.eclipse.tptp.platform.execution.util.ICommandHandler handler)
throws java.io.IOException
- Throws:
java.io.IOException
sendMessage
public void sendMessage(IControlMessage mesg,
org.eclipse.tptp.platform.execution.util.ICommandHandler handler)
throws java.io.IOException
- Sends a command to the specified destination, the command requires a control message object
and a commandhandler
- Throws:
java.io.IOException
sendData
public int sendData(int dataConnID,
byte[] buffer,
int bufferLength)
throws org.eclipse.tptp.platform.execution.exceptions.DataChannelConnectionException
- Throws:
org.eclipse.tptp.platform.execution.exceptions.DataChannelConnectionException
createDataConnection
public int createDataConnection(int direction)
addDataListener
public int addDataListener(int dataConnID,
org.eclipse.tptp.platform.execution.client.core.IDataProcessor dataProcessor)
createProcess
public org.eclipse.tptp.platform.execution.client.core.IProcess createProcess()
- Specified by:
createProcess in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
createProcess
public org.eclipse.tptp.platform.execution.client.core.IProcess createProcess(java.lang.String executable)
- Specified by:
createProcess in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
createProcess
public org.eclipse.tptp.platform.execution.client.core.IProcess createProcess(java.lang.String executable,
java.lang.String parameters)
- Specified by:
createProcess in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
handleRACCommand
public void handleRACCommand(org.eclipse.tptp.platform.execution.util.ICommandElement command)
getUser
public org.eclipse.tptp.platform.execution.security.User getUser()
setUser
public void setUser(org.eclipse.tptp.platform.execution.security.User user)
setSecurityParameters
public void setSecurityParameters(org.eclipse.tptp.platform.execution.security.ISecureClientParameters manager)
getSecurityParameters
public org.eclipse.tptp.platform.execution.security.ISecureClientParameters getSecurityParameters()
getConnectionInfo
public org.eclipse.tptp.platform.execution.client.core.ConnectionInfo getConnectionInfo()
- Specified by:
getConnectionInfo in interface org.eclipse.tptp.platform.execution.client.core.IAgentController
getConnection
public IConnection getConnection()
setConnection
public void setConnection(IConnection conn)
incomingCommand
public void incomingCommand(org.eclipse.tptp.platform.execution.client.core.INode node,
org.eclipse.tptp.platform.execution.util.ICommandElement command)
- Specified by:
incomingCommand in interface org.eclipse.tptp.platform.execution.util.ICommandHandler
getConsoleDataConnection
public int getConsoleDataConnection(int direction)
getConsoleMapper
public ConsoleDataProcessor getConsoleMapper()