public class RemoteRunMaster
extends org.jboss.netty.channel.SimpleChannelHandler
implements org.jboss.netty.channel.ChannelFutureListener
bind(java.net.InetSocketAddress) to start a TCP server to listen for agent connections.| Constructor and Description |
|---|
RemoteRunMaster()
The same as new RemoteRunMaster(Executors.newCachedThreadPool(), Executors.newCachedThreadPool(), null).
|
RemoteRunMaster(AgentConnectionCallback callback)
The same as new RemoteRunMaster(Executors.newCachedThreadPool(), Executors.newCachedThreadPool(), callback).
|
RemoteRunMaster(Executor bossExecutor,
Executor workerExecutor,
AgentConnectionCallback callback)
Creates a new RemoteRunMaster.
|
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
bind(InetSocketAddress address)
Bind and return the bound address.
|
void |
channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e) |
void |
channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e) |
static SSLEngine |
createSslEngine() |
void |
exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e) |
Set<AgentConnection> |
getAgentConnections() |
AgentConnectionCallback |
getCallback() |
Collection<AgentConnection> |
getConnectedClients()
Get a new copy of a collection containing all the actively connected clients.
|
static long |
getNextRequestId() |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent message) |
void |
operationComplete(org.jboss.netty.channel.ChannelFuture future) |
void |
setCallback(AgentConnectionCallback callback) |
void |
shutdown() |
String |
toString() |
bindRequested, channelBound, channelClosed, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete, writeRequestedpublic RemoteRunMaster()
public RemoteRunMaster(AgentConnectionCallback callback)
public RemoteRunMaster(Executor bossExecutor, Executor workerExecutor, AgentConnectionCallback callback)
bossExecutor - the Executor which will execute the boss threads, see
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory(Executor, Executor)workerExecutor - the Executor which will execute the I/O worker threads, see
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory(Executor, Executor)callback - optional callback when agents connect/send messagespublic static long getNextRequestId()
public AgentConnectionCallback getCallback()
public void setCallback(AgentConnectionCallback callback)
public static SSLEngine createSslEngine()
public InetSocketAddress bind(InetSocketAddress address)
address - socket address to bind topublic void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ExceptionEvent e)
throws Exception
exceptionCaught in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent message)
throws Exception
messageReceived in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws Exception
channelConnected in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic void operationComplete(org.jboss.netty.channel.ChannelFuture future)
throws Exception
operationComplete in interface org.jboss.netty.channel.ChannelFutureListenerExceptionpublic void channelDisconnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws Exception
channelDisconnected in class org.jboss.netty.channel.SimpleChannelHandlerExceptionpublic Set<AgentConnection> getAgentConnections()
public void shutdown()
public Collection<AgentConnection> getConnectedClients()
Copyright © 2016 Formicary. All rights reserved.