- java.lang.Object
-
- org.xnio.conduits.AbstractConduit<D>
-
- org.xnio.conduits.AbstractSinkConduit<D>
-
- org.xnio.conduits.AbstractMessageSinkConduit<MessageSinkConduit>
-
- org.xnio.sasl.SaslUnwrappingConduit
-
- All Implemented Interfaces:
Conduit
,MessageSinkConduit
,SinkConduit
public final class SaslUnwrappingConduit extends AbstractMessageSinkConduit<MessageSinkConduit> implements MessageSinkConduit
- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from class org.xnio.conduits.AbstractConduit
next
-
-
Constructor Summary
Constructors Constructor Description SaslUnwrappingConduit(MessageSinkConduit next, SaslWrapper wrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
flush()
Flush out any unwritten, buffered output.boolean
send(java.nio.ByteBuffer src)
Send a complete message.boolean
send(java.nio.ByteBuffer[] srcs, int offs, int len)
Send a complete message.boolean
sendFinal(java.nio.ByteBuffer src)
Send a complete message.boolean
sendFinal(java.nio.ByteBuffer[] srcs, int offs, int len)
Send a complete message.-
Methods inherited from class org.xnio.conduits.AbstractSinkConduit
awaitWritable, awaitWritable, 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, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites
-
-
-
-
Constructor Detail
-
SaslUnwrappingConduit
public SaslUnwrappingConduit(MessageSinkConduit next, SaslWrapper wrapper)
-
-
Method Detail
-
send
public boolean send(java.nio.ByteBuffer src) throws java.io.IOException
Description copied from interface:MessageSinkConduit
Send a complete message.- Specified by:
send
in interfaceMessageSinkConduit
- Overrides:
send
in classAbstractMessageSinkConduit<MessageSinkConduit>
- 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:
java.io.IOException
- if an I/O error occurs
-
send
public boolean send(java.nio.ByteBuffer[] srcs, int offs, int len) throws java.io.IOException
Description copied from interface:MessageSinkConduit
Send a complete message.- Specified by:
send
in interfaceMessageSinkConduit
- Overrides:
send
in classAbstractMessageSinkConduit<MessageSinkConduit>
- 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:
java.io.IOException
- if an I/O error occurs
-
sendFinal
public boolean sendFinal(java.nio.ByteBuffer src) throws java.io.IOException
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
- Overrides:
sendFinal
in classAbstractMessageSinkConduit<MessageSinkConduit>
- 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:
java.io.IOException
- if an I/O error occurs
-
sendFinal
public boolean sendFinal(java.nio.ByteBuffer[] srcs, int offs, int len) throws java.io.IOException
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
- Overrides:
sendFinal
in classAbstractMessageSinkConduit<MessageSinkConduit>
- 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:
java.io.IOException
- if an I/O error occurs
-
flush
public boolean flush() throws java.io.IOException
Description copied from interface:SinkConduit
Flush out any unwritten, buffered output.- Specified by:
flush
in interfaceSinkConduit
- Overrides:
flush
in classAbstractSinkConduit<MessageSinkConduit>
- Returns:
true
if everything is flushed,false
otherwise- Throws:
java.io.IOException
- if flush fails
-
-