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 java.nio.channels.Channel>| Constructor and Description |
|---|
RemotingMessageChannel(org.xnio.channels.ConnectedStreamChannel channel,
java.nio.ByteBuffer receiveBuffer,
java.nio.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.
|
java.net.SocketAddress |
getLocalAddress() |
<A extends java.net.SocketAddress> |
getLocalAddress(java.lang.Class<A> type) |
java.net.SocketAddress |
getPeerAddress() |
<A extends java.net.SocketAddress> |
getPeerAddress(java.lang.Class<A> type) |
int |
receive(java.nio.ByteBuffer buffer) |
long |
receive(java.nio.ByteBuffer[] buffers) |
long |
receive(java.nio.ByteBuffer[] buffers,
int offs,
int len) |
boolean |
send(java.nio.ByteBuffer buffer) |
boolean |
send(java.nio.ByteBuffer[] buffers) |
boolean |
send(java.nio.ByteBuffer[] buffers,
int offs,
int len) |
boolean |
sendFinal(java.nio.ByteBuffer buffer) |
boolean |
sendFinal(java.nio.ByteBuffer[] buffers) |
boolean |
sendFinal(java.nio.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,
java.nio.ByteBuffer receiveBuffer,
java.nio.ByteBuffer transmitBuffer)
channel - the channel to wrapreceiveBuffer - the receive buffer (should be direct)transmitBuffer - the send buffer (should be direct)public int receive(java.nio.ByteBuffer buffer)
throws java.io.IOException
receive in interface org.xnio.channels.ReadableMessageChanneljava.io.IOExceptionpublic long receive(java.nio.ByteBuffer[] buffers)
throws java.io.IOException
receive in interface org.xnio.channels.ReadableMessageChanneljava.io.IOExceptionpublic long receive(java.nio.ByteBuffer[] buffers,
int offs,
int len)
throws java.io.IOException
receive in interface org.xnio.channels.ReadableMessageChanneljava.io.IOExceptionprotected void shutdownReadsAction(boolean writeComplete)
throws java.io.IOException
shutdownReadsAction in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>java.io.IOExceptionpublic boolean send(java.nio.ByteBuffer buffer)
throws java.io.IOException
send in interface org.xnio.channels.WritableMessageChanneljava.io.IOExceptionpublic boolean send(java.nio.ByteBuffer[] buffers)
throws java.io.IOException
send in interface org.xnio.channels.WritableMessageChanneljava.io.IOExceptionpublic boolean send(java.nio.ByteBuffer[] buffers,
int offs,
int len)
throws java.io.IOException
send in interface org.xnio.channels.WritableMessageChanneljava.io.IOExceptionpublic boolean sendFinal(java.nio.ByteBuffer buffer)
throws java.io.IOException
sendFinal in interface org.xnio.channels.WritableMessageChanneljava.io.IOExceptionpublic boolean sendFinal(java.nio.ByteBuffer[] buffers)
throws java.io.IOException
sendFinal in interface org.xnio.channels.WritableMessageChanneljava.io.IOExceptionpublic boolean sendFinal(java.nio.ByteBuffer[] buffers,
int offs,
int len)
throws java.io.IOException
sendFinal in interface org.xnio.channels.WritableMessageChanneljava.io.IOExceptionprotected boolean flushAction(boolean shutDown)
throws java.io.IOException
flushAction in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>java.io.IOExceptionprotected void shutdownWritesComplete(boolean readShutDown)
throws java.io.IOException
shutdownWritesComplete in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>java.io.IOExceptionprotected void closeAction(boolean readShutDown,
boolean writeShutDown)
throws java.io.IOException
closeAction in class org.xnio.channels.TranslatingSuspendableChannel<org.xnio.channels.ConnectedMessageChannel,org.xnio.channels.ConnectedStreamChannel>java.io.IOExceptionpublic java.net.SocketAddress getPeerAddress()
getPeerAddress in interface org.xnio.channels.ConnectedChannelpublic <A extends java.net.SocketAddress> A getPeerAddress(java.lang.Class<A> type)
getPeerAddress in interface org.xnio.channels.ConnectedChannelpublic java.net.SocketAddress getLocalAddress()
getLocalAddress in interface org.xnio.channels.BoundChannelpublic <A extends java.net.SocketAddress> A getLocalAddress(java.lang.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.