Package org.xnio.channels
Interface WritableMultipointMessageChannel
- All Superinterfaces:
AutoCloseable,Channel,Closeable,CloseableChannel,Configurable,InterruptibleChannel,SuspendableWriteChannel
- All Known Subinterfaces:
BoundMultipointMessageChannel,MulticastMessageChannel,MultipointMessageChannel
The writable side of a multipoint message channel.
- See Also:
-
Field Summary
Fields inherited from interface org.xnio.channels.Configurable
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionGet the setter which can be used to change the close listener for this channel.Get the setter which can be used to change the write listener for this channel.booleansendTo(SocketAddress target, ByteBuffer buffer) Send a buffer to a destination.booleansendTo(SocketAddress target, ByteBuffer[] buffers) Send a message with data from multiple buffers to a destination.booleansendTo(SocketAddress target, ByteBuffer[] buffers, int offset, int length) Send a message with data from multiple buffers to a destination.Methods inherited from interface org.xnio.channels.CloseableChannel
getIoThread, getWorkerMethods inherited from interface org.xnio.channels.Configurable
getOption, setOption, supportsOptionMethods inherited from interface org.xnio.channels.SuspendableWriteChannel
awaitWritable, awaitWritable, close, flush, getWriteThread, isOpen, isWriteResumed, resumeWrites, shutdownWrites, suspendWrites, wakeupWrites
-
Method Details
-
sendTo
Send a buffer to a destination.- Parameters:
target- the destinationbuffer- the data to send- Returns:
trueif the message was sent, orfalseif the channel is not currently writable- Throws:
IOException- if an I/O error occurs
-
sendTo
Send a message with data from multiple buffers to a destination.- Parameters:
target- the destinationbuffers- the data to send- Returns:
trueif the message was sent, orfalseif the channel is not currently writable- Throws:
IOException- if an I/O error occurs
-
sendTo
boolean sendTo(SocketAddress target, ByteBuffer[] buffers, int offset, int length) throws IOException Send a message with data from multiple buffers to a destination.- Parameters:
target- the destinationbuffers- the data to sendoffset- the offset into thebuffersarraylength- the number of buffers to read from- Returns:
trueif the message was sent, orfalseif the channel is not currently writable- Throws:
IOException- if an I/O error occurs
-
getWriteSetter
ChannelListener.Setter<? extends WritableMultipointMessageChannel> getWriteSetter()Get the setter which can be used to change the write listener for this channel.- Specified by:
getWriteSetterin interfaceSuspendableWriteChannel- Returns:
- the setter
-
getCloseSetter
ChannelListener.Setter<? extends WritableMultipointMessageChannel> getCloseSetter()Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.- Specified by:
getCloseSetterin interfaceCloseableChannel- Specified by:
getCloseSetterin interfaceSuspendableWriteChannel- Returns:
- the setter
-