com.mindbright.nio
Interface NIOCallback

All Known Implementing Classes:
SSH2InternalChannel, SSH2ProcChannel, SSH2RetryingTCPChannel, SSH2SessionChannel, SSH2SFTP.SFTPPacket, SSH2StreamChannel, SSH2TCPChannel, SSH2Transport, SSHClient, SSHInteractiveClient

public interface NIOCallback

Defines callback methods for non blocking io operations.

See Also:
Switchboard, NetworkConnection, NonBlockingInput

Method Summary
 void completed(java.nio.ByteBuffer buf)
          Called once the network read operation has been completed
 void connected(boolean timeout)
          Called once the connection has been established (assuming interest for this has been registered by calling the NotifyWhenConnected method of Switchboard).
 void connectionFailed(java.lang.Exception e)
          Called if the connection failed (assuming interest for this has been registered by calling the NotifyWhenConnected method of Switchboard).
 void readFailed(java.lang.Exception e)
          Called if the read failed
 void writeFailed()
          Called if the write failed
 

Method Detail

completed

void completed(java.nio.ByteBuffer buf)
Called once the network read operation has been completed

Parameters:
buf - the buffer provided to the read call

readFailed

void readFailed(java.lang.Exception e)
Called if the read failed


writeFailed

void writeFailed()
Called if the write failed


connected

void connected(boolean timeout)
Called once the connection has been established (assuming interest for this has been registered by calling the NotifyWhenConnected method of Switchboard).

Parameters:
timeout - true if the connection attempt timed out

connectionFailed

void connectionFailed(java.lang.Exception e)
Called if the connection failed (assuming interest for this has been registered by calling the NotifyWhenConnected method of Switchboard).

Parameters:
e - the exception the connection failed with.