Package org.apache.qpid.server.transport
Class NonBlockingConnection
- java.lang.Object
-
- org.apache.qpid.server.transport.NonBlockingConnection
-
- All Implemented Interfaces:
ByteBufferSender
,NetworkConnection
,ServerNetworkConnection
public class NonBlockingConnection extends Object implements ServerNetworkConnection, ByteBufferSender
-
-
Constructor Summary
Constructors Constructor Description NonBlockingConnection(SocketChannel socketChannel, ProtocolEngine protocolEngine, Set<TransportEncryption> encryptionSet, Runnable onTransportEncryptionAction, NetworkConnectionScheduler scheduler, AmqpPort port)
-
Method Summary
-
-
-
Constructor Detail
-
NonBlockingConnection
public NonBlockingConnection(SocketChannel socketChannel, ProtocolEngine protocolEngine, Set<TransportEncryption> encryptionSet, Runnable onTransportEncryptionAction, NetworkConnectionScheduler scheduler, AmqpPort port)
-
-
Method Detail
-
isPartialRead
public boolean isPartialRead()
-
start
public void start()
- Specified by:
start
in interfaceNetworkConnection
-
getSender
public ByteBufferSender getSender()
- Specified by:
getSender
in interfaceNetworkConnection
-
close
public void close()
- Specified by:
close
in interfaceByteBufferSender
- Specified by:
close
in interfaceNetworkConnection
-
getRemoteAddress
public SocketAddress getRemoteAddress()
- Specified by:
getRemoteAddress
in interfaceNetworkConnection
- Returns:
- the remote address of the underlying socket.
-
getLocalAddress
public SocketAddress getLocalAddress()
- Specified by:
getLocalAddress
in interfaceNetworkConnection
- Returns:
- the local address of the underlying socket.
-
setMaxWriteIdleMillis
public void setMaxWriteIdleMillis(long millis)
- Specified by:
setMaxWriteIdleMillis
in interfaceNetworkConnection
-
setMaxReadIdleMillis
public void setMaxReadIdleMillis(long millis)
- Specified by:
setMaxReadIdleMillis
in interfaceNetworkConnection
-
getPeerPrincipal
public Principal getPeerPrincipal()
- Specified by:
getPeerPrincipal
in interfaceNetworkConnection
-
getPeerCertificate
public Certificate getPeerCertificate()
- Specified by:
getPeerCertificate
in interfaceNetworkConnection
-
getMaxReadIdleMillis
public long getMaxReadIdleMillis()
- Specified by:
getMaxReadIdleMillis
in interfaceNetworkConnection
-
getMaxWriteIdleMillis
public long getMaxWriteIdleMillis()
- Specified by:
getMaxWriteIdleMillis
in interfaceNetworkConnection
-
getTransportInfo
public String getTransportInfo()
- Specified by:
getTransportInfo
in interfaceServerNetworkConnection
-
isStateChanged
public boolean isStateChanged()
-
doPreWork
public void doPreWork()
-
doWork
public boolean doWork()
-
addSchedulingDelayNotificationListeners
public void addSchedulingDelayNotificationListeners(SchedulingDelayNotificationListener listener)
- Specified by:
addSchedulingDelayNotificationListeners
in interfaceServerNetworkConnection
-
removeSchedulingDelayNotificationListeners
public void removeSchedulingDelayNotificationListeners(SchedulingDelayNotificationListener listener)
- Specified by:
removeSchedulingDelayNotificationListeners
in interfaceServerNetworkConnection
-
readFromNetwork
protected long readFromNetwork() throws IOException
- Throws:
IOException
-
isDirectBufferPreferred
public boolean isDirectBufferPreferred()
- Specified by:
isDirectBufferPreferred
in interfaceByteBufferSender
-
send
public void send(QpidByteBuffer msg)
- Specified by:
send
in interfaceByteBufferSender
-
flush
public void flush()
- Specified by:
flush
in interfaceByteBufferSender
-
pushScheduler
public final void pushScheduler(NetworkConnectionScheduler scheduler)
-
popScheduler
public final NetworkConnectionScheduler popScheduler()
-
getScheduler
public final NetworkConnectionScheduler getScheduler()
-
processAmqpData
public void processAmqpData(QpidByteBuffer applicationData)
-
setTransportEncryption
public void setTransportEncryption(TransportEncryption transportEncryption)
-
setScheduled
public boolean setScheduled()
-
clearScheduled
public void clearScheduled()
-
getScheduledTime
public long getScheduledTime()
- Specified by:
getScheduledTime
in interfaceServerNetworkConnection
-
getSelectionTask
public org.apache.qpid.server.transport.SelectorThread.SelectionTask getSelectionTask()
-
setSelectionTask
public void setSelectionTask(org.apache.qpid.server.transport.SelectorThread.SelectionTask selectionTask)
-
setSelectedHost
public void setSelectedHost(String selectedHost)
-
getSelectedHost
public String getSelectedHost()
- Specified by:
getSelectedHost
in interfaceServerNetworkConnection
-
-