public class AgentConnection extends Object
| 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()
public void setConnectionState(ConnectionState connectionState)
public SocketAddress getRemoteAddress()
public RemoteRun.AgentToMaster.AgentInfo getAgentInfo()
public void setAgentInfo(RemoteRun.AgentToMaster.AgentInfo agentInfo)
public void shutdown()
public long upload(Path localSourcePath, String remoteTargetDirectory, UploadCompleteCallback callback)
localSourcePath - 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)
public long request(AgentRequest message)
public void write(RemoteRun.MasterToAgent message)
public void messageReceived(AgentConnection agent, RemoteRun.AgentToMaster message)
Copyright © 2016 Formicary. All rights reserved.