private void kick ( ) { if ( ! connected ) { return ; } messagesIn . clear ( ) ; messagesOut . clear ( ) ; try { out . close ( ) ; } catch ( final IOException exception ) { Verbose . exception ( exception , "Error on closing output" ) ; } try { in . close ( ) ; } catch ( final IOException exception ) { Verbose . exception ( exception , "Error on closing input" ) ; } try { socket . close ( ) ; } catch ( final IOException exception ) { Verbose . exception ( exception , "Error on closing socket" ) ; } for ( final ConnectionListener listener : listeners ) { listener . notifyConnectionTerminated ( Byte . valueOf ( getId ( ) ) ) ; } listeners . clear ( ) ; connected = false ; Verbose . info ( "Disconnected from the server !" ) ; }
Terminate connection .