
public class RemotingMessageChannel
extends org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>
implements org.xnio.channels.ConnectedMessageChannel
FramedMessageChannel to fix
REM3-259 issue.
While slightly modified, it is basically a copy of FramedMessageChannelorg.xnio.channels.ReadListenerSettable.Setter<C extends Channel>org.xnio.channels.WriteListenerSettable.Setter<C extends Channel>org.xnio.channels.CloseListenerSettable.Setter<C extends Channel>| Constructor and Description |
|---|
RemotingMessageChannel(org.xnio.channels.ConnectedStreamChannel channel,
ByteBuffer receiveBuffer,
ByteBuffer transmitBuffer)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeAction(boolean readShutDown,
boolean writeShutDown) |
protected boolean |
flushAction(boolean shutDown) |
org.xnio.channels.ConnectedStreamChannel |
getChannel()
Get the underlying channel.
|
SocketAddress |
getLocalAddress() |
<A extends SocketAddress> |
getLocalAddress(Class<A> type) |
SocketAddress |
getPeerAddress() |
<A extends SocketAddress> |
getPeerAddress(Class<A> type) |
int |
receive(ByteBuffer buffer) |
long |
receive(ByteBuffer[] buffers) |
long |
receive(ByteBuffer[] buffers,
int offs,
int len) |
boolean |
send(ByteBuffer buffer) |
boolean |
send(ByteBuffer[] buffers) |
boolean |
send(ByteBuffer[] buffers,
int offs,
int len) |
protected void |
shutdownReadsAction(boolean writeComplete) |
protected void |
shutdownWritesComplete(boolean readShutDown) |
awaitReadable, awaitReadable, awaitWritable, awaitWritable, clearReadReady, clearReadRequiresWrite, clearWriteReady, clearWriteRequiresRead, close, flush, getCloseListener, getCloseSetter, getIoThread, getOption, getReadListener, getReadSetter, getReadThread, getWorker, getWriteListener, getWriteSetter, getWriteThread, handleClosed, handleReadable, handleWritable, isOpen, isReadResumed, isReadShutDown, isWriteComplete, isWriteResumed, isWriteShutDown, readRequiresWrite, removeReadRequiresExternal, removeWriteRequiresExternal, resumeReads, resumeWrites, setClosed, setCloseListener, setOption, setReadListener, setReadReady, setReadRequiresWrite, setReadShutDown, setWriteListener, setWriteReady, setWriteRequiresRead, setWriteShutDown, shutdownReads, shutdownWrites, shutdownWritesAction, supportsOption, suspendReads, suspendWrites, thisTyped, toString, tryAddReadRequiresExternal, tryAddWriteRequiresExternal, wakeupReads, wakeupWrites, writeRequiresReadclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCloseSetter, getReadSetter, getWriteSetterawaitReadable, awaitReadable, getReadThread, isReadResumed, resumeReads, shutdownReads, suspendReads, wakeupReadspublic RemotingMessageChannel(org.xnio.channels.ConnectedStreamChannel channel,
ByteBuffer receiveBuffer,
ByteBuffer transmitBuffer)
channel - the channel to wrapreceiveBuffer - the receive buffer (should be direct)transmitBuffer - the send buffer (should be direct)public int receive(ByteBuffer buffer) throws IOException
receive in interface org.xnio.channels.ReadableMessageChannelIOExceptionpublic long receive(ByteBuffer[] buffers) throws IOException
receive in interface org.xnio.channels.ReadableMessageChannelIOExceptionpublic long receive(ByteBuffer[] buffers, int offs, int len) throws IOException
receive in interface org.xnio.channels.ReadableMessageChannelIOExceptionprotected void shutdownReadsAction(boolean writeComplete)
throws IOException
shutdownReadsAction in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>IOExceptionpublic boolean send(ByteBuffer buffer) throws IOException
send in interface org.xnio.channels.WritableMessageChannelIOExceptionpublic boolean send(ByteBuffer[] buffers) throws IOException
send in interface org.xnio.channels.WritableMessageChannelIOExceptionpublic boolean send(ByteBuffer[] buffers, int offs, int len) throws IOException
send in interface org.xnio.channels.WritableMessageChannelIOExceptionprotected boolean flushAction(boolean shutDown)
throws IOException
flushAction in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>IOExceptionprotected void shutdownWritesComplete(boolean readShutDown)
throws IOException
shutdownWritesComplete in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>IOExceptionprotected void closeAction(boolean readShutDown,
boolean writeShutDown)
throws IOException
closeAction in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>IOExceptionpublic SocketAddress getPeerAddress()
getPeerAddress in interface org.xnio.channels.ConnectedChannelpublic <A extends SocketAddress> A getPeerAddress(Class<A> type)
getPeerAddress in interface org.xnio.channels.ConnectedChannelpublic SocketAddress getLocalAddress()
getLocalAddress in interface org.xnio.channels.BoundChannelpublic <A extends SocketAddress> A getLocalAddress(Class<A> type)
getLocalAddress in interface org.xnio.channels.BoundChannelpublic org.xnio.channels.ConnectedStreamChannel getChannel()
getChannel in interface org.xnio.channels.WrappedChannel<org.xnio.channels.ConnectedStreamChannel>getChannel in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>Copyright © 2017 JBoss, a division of Red Hat, Inc.. All Rights Reserved.