|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

public interface IWriteCompletionHandler
Call back handler. Example:
class MyWriteCompletionHandler implements IWriteCompletionHandler {
public void onWritten(int written) throws IOException {
// ...
}
public void onException(IOException ioe) {
// ...
}
}
ReadableByteChannel channel = ...
INonBlockingConnection con = ...
MyWriteCompletionHandler writeCompletionHandler = new MyWriteCompletionHandler();
con.setFlushmode(FlushMode.ASYNC);
con.write(transferBuffer, writeCompletionHandler); // returns immediately
// ...
| Method Summary | |
|---|---|
void |
onException(IOException ioe)
call back to sginal a write error |
void |
onWritten(int written)
call back, which will be called after the data is written |
| Method Detail |
|---|
void onWritten(int written)
throws IOException
written - the written size
IOException - if an exception occurs. By throwing this
exception the connection will be closed by xSocketvoid onException(IOException ioe)
ioe - the exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||