public interface CmdAgent extends Remote
CmdService
,
CmdAgentImpl
,
GenericBenchmark
Modifier and Type | Method and Description |
---|---|
void |
downloadServices(List<String> pathList)
Downloads the files used by services and tools to
the remote agent system.
|
<V extends Serializable> |
exec(RemoteCallable<V> callable,
String contextLocation)
Executes the RemoteCallable on the target instance.
|
CommandHandle |
execute(Command c,
String svcPath)
Executes a command from the remote command agent.
|
String |
getHostName()
Return the hostname of this machine as known to this machine
itself.
|
long |
getTime()
Gets the time on the agent host, in millis.
|
String |
getTmpDir()
Obtains the tmp directory of a remote host.
|
CommandHandle |
java(Command c,
String svcPath)
Executes a java command from the remote command agent.
|
void |
kill()
This method is responsible for aborting a running command.
|
void |
setLogLevel(String name,
Level level)
Set the logging level of the Agents.
|
void |
setTime(String gmtTimeString)
Sets the time on the agent host, in GMT.
|
boolean |
startAgent(Class agentClass,
String ident)
This method creates the Agent class and registers it with
the registry using ident@
|
void |
updatePaths(List<String> pathList)
Updates the paths, usually in the local command agent.
|
String |
which(String cmd,
String svcPath)
Similar to the which shell command, 'which' returns the actual path
to the given command.
|
String getHostName() throws RemoteException
RemoteException
- A communications error occurredString getTmpDir() throws RemoteException
RemoteException
- A communications error occurredvoid setLogLevel(String name, Level level) throws RemoteException
name
- The name of the loggerlevel
- The log levelRemoteException
- A communications error occurredvoid updatePaths(List<String> pathList) throws RemoteException
pathList
- The list of paths to downloadRemoteException
- If there is an error updating the pathsvoid downloadServices(List<String> pathList) throws RemoteException
pathList
- The list of service bundle pathsRemoteException
- If there is an error downloadingString which(String cmd, String svcPath) throws RemoteException
cmd
- The command to search forsvcPath
- The service path, if anyRemoteException
- If there is a communication error to the
remote agentCommandHandle execute(Command c, String svcPath) throws IOException, InterruptedException, RemoteException
c
- The command to be executedsvcPath
- IOException
- Error communicating with resulting processInterruptedException
- Thread got interrupted waitingRemoteException
- If there is a communication error to the
remote agentCommandHandle java(Command c, String svcPath) throws IOException, InterruptedException, RemoteException
c
- The command containing the main classsvcPath
- IOException
- Error communicating with resulting processInterruptedException
- Thread got interrupted waitingRemoteException
<V extends Serializable> V exec(RemoteCallable<V> callable, String contextLocation) throws Exception
callable
- The callable to executecontextLocation
- The context location of the invokerException
- Any exception from the callableboolean startAgent(Class agentClass, String ident) throws Exception
agentClass
- Impl class of the Agent to be startedident
- Identifier to be usedException
- An error occurredvoid kill() throws RemoteException
RemoteException
- A communications error occurredvoid setTime(String gmtTimeString) throws IOException
gmtTimeString
- IOException
- A I/O error occurredlong getTime() throws RemoteException
RemoteException
- A communications error occurred