org.xsocket.connection
Interface IConnectExceptionHandler
- All Superinterfaces: 
- IHandler
- public interface IConnectExceptionHandler 
- extends IHandler
Handles connect exception. This handler is only supported on the client-side  
 
 E.g. 
 
 Handler implements IConnectHandler, IConnectExceptionHandler, IDataHandler {
 
    public boolean onConnect(INonBlockingConnection connection) throws IOException, BufferUnderflowException, MaxReadSizeExceededException {
       ...
    }
    public boolean onConnectException(INonBlockingConnection connection, IOException ioe) throws IOException {
       ...
    }
        
    public boolean onData(INonBlockingConnection connection) throws IOException, BufferUnderflowException, ClosedChannelException, MaxReadSizeExceededException {
       ...
    }
    
 }
 
  
  Handler hdl = new Handler();
  INonBlockingConnection con = new NonBlockingConnection(InetAddress.getByName(host), port, hdl, false, 500);
  ...
  
- Author:
- grro@xsocket.org
 
 
 
onConnectException
boolean onConnectException(INonBlockingConnection connection,
                           IOException ioe)
                           throws IOException
- handle a connect exception
 
- 
 
- 
- Parameters:
- connection- the connection
- ioe- the exception
- Returns:
- true for positive result of handling, false for negative result of handling
- Throws:
- IOException- if some other I/O error occurs. Throwing this exception causes that the underlying connection will be closed.
 
Copyright 2010 						xSocket.org