|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IBufferedConnection
This functionality must be provided by the underlying communication layer in order to attach the API protocol to it.
Method Summary | |
---|---|
void |
close()
Shuts down the connection, after which time it should no longer be used. |
int |
fill(int want)
Requests that the read buffer be refilled. |
void |
flush()
Finishes off the current write buffer and tries to send it. |
java.nio.ByteBuffer |
getReadBuffer()
Provides direct access to the connection's read buffer. |
java.nio.ByteBuffer |
getWriteBuffer()
Provides direct access to the connection's write buffer. |
void |
setCallback(IBufferedConnectionCallback callback)
Sets the callback for activity on the connection and initializes the request dispatching mechanism (optional). |
Method Detail |
---|
java.nio.ByteBuffer getReadBuffer()
java.nio.ByteBuffer getWriteBuffer()
int fill(int want) throws java.io.IOException
want
- the number of bytes that the caller would like to be
read into the buffer before returning control to the caller
java.io.IOException
- if an I/O error occurs or the connection closes
before the requested number of bytes have been readvoid flush() throws java.io.IOException
java.io.IOException
- if an I/O error occursvoid close() throws java.io.IOException
java.io.IOException
- if an I/O error occursvoid setCallback(IBufferedConnectionCallback callback) throws java.io.IOException
callback
- the callback to use for activity
java.lang.UnsupportedOperationException
- if callbacks are not implemented
java.io.IOException
- if an I/O error occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |