Package org.xnio.conduits

# Interface MessageSinkConduit

All Superinterfaces:
  `Conduit`, `SinkConduit`

All Known Implementing Classes:
  `AbstractMessageSinkConduit`, `FramingMessageSinkConduit`, `SaslUnwrappingConduit`, `SaslWrappingConduit`, `SynchronizedMessageSinkConduit`

public interface MessageSinkConduit extends SinkConduit
A message sink conduit.

Author:
  David M. Lloyd

## Method Summary

Modifier and Type
Method
Description
`boolean`
`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 interface org.xnio.conduits.Conduit

`getWorker`

### Methods inherited from interface org.xnio.conduits.SinkConduit

`awaitWritable, awaitWritable, flush, getWriteThread, isWriteResumed, isWriteShutdown, resumeWrites, setWriteReadyHandler, suspendWrites, terminateWrites, truncateWrites, wakeupWrites`

## Method Details

### send

boolean send(ByteBuffer src) throws IOException
Send a complete message.

Parameters:
  `src` - the message to send
Returns:
  the result of the send operation; `true` if the message was sent, or `false` if it would block
Throws:
  `IOException` - if an I/O error occurs

### send

boolean send(ByteBuffer[] srcs, int offs, int len) throws IOException
Send a complete message.

Parameters:
  `srcs` - the buffers holding the message to send
  `offs` - the offset into the buffer array of the first buffer
  `len` - the number of buffers that contain data to send
Returns:
  the result of the send operation; `true` if the message was sent, or `false` if it would block
Throws:
  `IOException` - if an I/O error occurs

### sendFinal

boolean sendFinal(ByteBuffer src) throws IOException
Send a complete message. If the message is successfully sent then the sink will have its writes terminated.

Parameters:
  `src` - the message to send
Returns:
  the result of the send operation; `true` if the message was sent, or `false` if it would block
Throws:
  `IOException` - if an I/O error occurs

### sendFinal

boolean sendFinal(ByteBuffer[] srcs, int offs, int len) throws IOException
Send a complete message. If the message is successfully sent then the sink will have its writes terminated.

Parameters:
  `srcs` - the buffers holding the message to send
  `offs` - the offset into the buffer array of the first buffer
  `len` - the number of buffers that contain data to send
Returns:
  the result of the send operation; `true` if the message was sent, or `false` if it would block
Throws:
  `IOException` - if an I/O error occurs