public static interface ProtocolLayer.Send extends ProtocolLayer
ProtocolLayer.Recv, ProtocolLayer.SendEMPTY_BUFFER, UTF_8| Modifier and Type | Method and Description |
|---|---|
void |
doCloseSend()
Notify the lower layer that it should close.
|
void |
doSend(ByteBuffer data)
Sends data to the lower layer.
|
boolean |
isSendOpen()
Tracks if this layer is submitting data to be sent via
doSend(ByteBuffer). |
init, startvoid doSend(@Nonnull ByteBuffer data) throws IOException
data - the data to send. Any data consumed from the ByteBuffer can be assumed as processed.
Any data not consumed from the ByteBuffer will be the responsibility of the caller
to resubmit in subsequent calls.IOException - if there was an error during processing of the data.void doCloseSend()
throws IOException
ProtocolLayer.Recv.onRecvClosed(IOException) for any upper layers.IOException - if there was an error closing the lower layer.boolean isSendOpen()
doSend(ByteBuffer).
Once this method returns false it must always return false and can be assumed to behave in
this way.true if submitting data to be sent via doSend(ByteBuffer).Copyright © 2004–2020. All rights reserved.