java.lang.Object
org.xnio.conduits.AbstractConduit<D>
org.xnio.conduits.AbstractSinkConduit<D>
org.xnio.conduits.AbstractMessageSinkConduit<D>
- All Implemented Interfaces:
Conduit
,MessageSinkConduit
,SinkConduit
- Direct Known Subclasses:
SaslUnwrappingConduit
,SaslWrappingConduit
public abstract class AbstractMessageSinkConduit<D extends MessageSinkConduit>
extends AbstractSinkConduit<D>
implements MessageSinkConduit
An abstract base class for filtering message sink conduits.
- Author:
- David M. Lloyd
-
Field Summary
Fields inherited from class org.xnio.conduits.AbstractConduit
next
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractMessageSinkConduit
(D next) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
send
(ByteBuffer src) Send a complete message.boolean
send
(ByteBuffer[] srcs, int offs, int len) Send a complete message.boolean
sendFinal
(ByteBuffer src) Send a complete message.boolean
sendFinal
(ByteBuffer[] srcs, int offs, int len) Send a complete message.Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites
Methods inherited from class org.xnio.conduits.AbstractConduit
getWorker
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xnio.conduits.SinkConduit
awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites
-
Constructor Details
-
AbstractMessageSinkConduit
Construct a new instance.- Parameters:
next
- the delegate conduit to set
-
-
Method Details
-
send
Description copied from interface:MessageSinkConduit
Send a complete message.- Specified by:
send
in interfaceMessageSinkConduit
- Parameters:
src
- the message to send- Returns:
- the result of the send operation;
true
if the message was sent, orfalse
if it would block - Throws:
IOException
- if an I/O error occurs
-
send
Description copied from interface:MessageSinkConduit
Send a complete message.- Specified by:
send
in interfaceMessageSinkConduit
- Parameters:
srcs
- the buffers holding the message to sendoffs
- the offset into the buffer array of the first bufferlen
- the number of buffers that contain data to send- Returns:
- the result of the send operation;
true
if the message was sent, orfalse
if it would block - Throws:
IOException
- if an I/O error occurs
-
sendFinal
Description copied from interface:MessageSinkConduit
Send a complete message. If the message is successfully sent then the sink will have its writes terminated.- Specified by:
sendFinal
in interfaceMessageSinkConduit
- Parameters:
srcs
- the buffers holding the message to sendoffs
- the offset into the buffer array of the first bufferlen
- the number of buffers that contain data to send- Returns:
- the result of the send operation;
true
if the message was sent, orfalse
if it would block - Throws:
IOException
- if an I/O error occurs
-
sendFinal
Description copied from interface:MessageSinkConduit
Send a complete message. If the message is successfully sent then the sink will have its writes terminated.- Specified by:
sendFinal
in interfaceMessageSinkConduit
- Parameters:
src
- the message to send- Returns:
- the result of the send operation;
true
if the message was sent, orfalse
if it would block - Throws:
IOException
- if an I/O error occurs
-