public interface WriteBufferReceiver
Modifier and Type | Method and Description |
---|---|
void |
close()
Flags to close the
WriteBufferReceiver . |
WriteBuffer |
createWriteBuffer(byte[] data,
int length)
Creates a
WriteBuffer for the data. |
WriteBuffer |
createWriteBuffer(ByteBuffer buffer)
Creates the
WriteBuffer for the ByteBuffer . |
Object |
getLock()
Obtains the lock to
synchronize for using this
WriteBufferReceiver . |
boolean |
isClosed()
Indicates if the
WriteBufferReceiver is closed. |
void |
writeData(WriteBuffer[] data)
Writes data to client of this
Connection . |
Object getLock()
synchronize
for using this
WriteBufferReceiver
.WriteBufferReceiver
.WriteBuffer createWriteBuffer(byte[] data, int length)
WriteBuffer
for the data.data
- Data.length
- Length of data.WriteBuffer
.WriteBuffer createWriteBuffer(ByteBuffer buffer)
WriteBuffer
for the ByteBuffer
.buffer
- ByteBuffer
.WriteBuffer
.void writeData(WriteBuffer[] data) throws IOException
Connection
.data
- Data to be written.IOException
- If fails to write data.void close() throws IOException
Flags to close the WriteBufferReceiver
.
Close occurs after all data has been written.
IOException
- If fails to close.boolean isClosed()
WriteBufferReceiver
is closed.true
if the WriteBufferReceiver
is closed.Copyright © 2005–2016. All rights reserved.