public class AgentConnection extends Object implements IAgentConnection
| Constructor and Description |
|---|
AgentConnection(org.jboss.netty.channel.Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
long |
download(String remoteSourcePath,
Path localTargetDirectory,
FileDownloadCallback callback) |
RemoteRun.AgentToMaster.AgentInfo |
getAgentInfo() |
org.jboss.netty.channel.Channel |
getChannel() |
ConnectionState |
getConnectionState() |
SocketAddress |
getRemoteAddress() |
void |
messageReceived(AgentConnection agent,
RemoteRun.AgentToMaster message) |
long |
request(AgentRequest message) |
void |
setAgentInfo(RemoteRun.AgentToMaster.AgentInfo agentInfo) |
void |
setChannel(org.jboss.netty.channel.Channel channel) |
void |
setConnectionState(ConnectionState connectionState) |
void |
shutdown()
Disconnect this agent.
|
String |
toString() |
long |
upload(Path localSourcePath,
String remoteTargetDirectory,
UploadCompleteCallback callback)
Initiate the upload of a file from master to agent.
|
void |
write(RemoteRun.MasterToAgent message)
Transmit a message that has already been given a unique request ID, and commit to handling the responses yourself
with the AgentConnectionCallback registered.
|
public org.jboss.netty.channel.Channel getChannel()
public void setChannel(org.jboss.netty.channel.Channel channel)
public ConnectionState getConnectionState()
getConnectionState in interface IAgentConnectionpublic void setConnectionState(ConnectionState connectionState)
setConnectionState in interface IAgentConnectionpublic SocketAddress getRemoteAddress()
public RemoteRun.AgentToMaster.AgentInfo getAgentInfo()
getAgentInfo in interface IAgentConnectionpublic void setAgentInfo(RemoteRun.AgentToMaster.AgentInfo agentInfo)
setAgentInfo in interface IAgentConnectionpublic void shutdown()
IAgentConnectionshutdown in interface IAgentConnectionpublic long upload(Path localSourcePath, String remoteTargetDirectory, UploadCompleteCallback callback)
IAgentConnectionupload in interface IAgentConnectionlocalSourcePath - path to read and send on this hostremoteTargetDirectory - where to try and store the data on the targetcallback - callback when the send is complete, can be nullpublic long download(String remoteSourcePath, Path localTargetDirectory, FileDownloadCallback callback)
download in interface IAgentConnectionpublic long request(AgentRequest message)
request in interface IAgentConnectionpublic void write(RemoteRun.MasterToAgent message)
IAgentConnectionwrite in interface IAgentConnectionpublic void messageReceived(AgentConnection agent, RemoteRun.AgentToMaster message)
Copyright © 2016 Formicary. All rights reserved.