public abstract class AbstractNioManager extends java.lang.Object implements NioManager
Modifier and Type | Class and Description |
---|---|
static class |
AbstractNioManager.NioIdentifier |
static class |
AbstractNioManager.NioServerIdentifier |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<NioCallback,java.nio.ByteBuffer> |
buffers |
protected java.util.Queue<ChangeRequest> |
changeRequestQueue |
protected ExecutionManager |
executionManager |
protected java.util.Map<AbstractNioManager.NioIdentifier,java.nio.channels.SocketChannel> |
identifiers |
protected org.apache.log4j.Logger |
log |
protected java.util.Map<java.nio.channels.SocketChannel,NioCallback> |
nioCallbacks |
protected java.lang.Class<?> |
ownerClass |
protected java.util.Map<java.nio.channels.SocketChannel,java.util.Queue<com.inductiveautomation.ignition.common.nio.AbstractNioManager.QueuedByteBuffer>> |
pendingData |
protected java.nio.channels.Selector |
selector |
Modifier and Type | Method and Description |
---|---|
protected void |
accept(java.nio.channels.SelectionKey key) |
protected void |
closeChannel(java.nio.channels.ServerSocketChannel channel) |
protected void |
closeChannel(java.nio.channels.SocketChannel channel) |
void |
disconnect(AbstractNioManager.NioIdentifier identifier) |
protected void |
finishConnect(java.nio.channels.SelectionKey key) |
protected void |
removeCallbacks(java.nio.channels.SocketChannel channel) |
void |
run() |
void |
send(java.nio.ByteBuffer buffer,
AbstractNioManager.NioIdentifier identifier) |
void |
shutdown() |
@GuardedBy(value="pendingData") protected final java.util.Map<java.nio.channels.SocketChannel,java.util.Queue<com.inductiveautomation.ignition.common.nio.AbstractNioManager.QueuedByteBuffer>> pendingData
@GuardedBy(value="changeRequestQueue") protected final java.util.Queue<ChangeRequest> changeRequestQueue
protected final java.util.Map<NioCallback,java.nio.ByteBuffer> buffers
protected final java.util.Map<java.nio.channels.SocketChannel,NioCallback> nioCallbacks
protected final java.util.Map<AbstractNioManager.NioIdentifier,java.nio.channels.SocketChannel> identifiers
protected final ExecutionManager executionManager
protected final java.lang.Class<?> ownerClass
protected final org.apache.log4j.Logger log
protected final java.nio.channels.Selector selector
public void shutdown()
shutdown
in interface NioManager
public void send(java.nio.ByteBuffer buffer, AbstractNioManager.NioIdentifier identifier)
send
in interface NioManager
public void disconnect(AbstractNioManager.NioIdentifier identifier)
disconnect
in interface NioManager
public void run()
run
in interface java.lang.Runnable
protected void finishConnect(java.nio.channels.SelectionKey key)
protected void accept(java.nio.channels.SelectionKey key)
protected void removeCallbacks(java.nio.channels.SocketChannel channel)
protected void closeChannel(java.nio.channels.SocketChannel channel)
protected void closeChannel(java.nio.channels.ServerSocketChannel channel)