protected void channelRequest ( String requesttype , boolean wantreply , byte [ ] requestdata ) throws SshException { try { if ( requesttype . equals ( "exit-status" ) ) { if ( requestdata != null ) { exitcode = ( int ) ByteArrayReader . readInt ( requestdata , 0 ) ; } } if ( requesttype . equals ( "exit-signal" ) ) { if ( requestdata != null ) { ByteArrayReader bar = new ByteArrayReader ( requestdata , 0 , requestdata . length ) ; try { exitsignalinfo = "Signal=" + bar . readString ( ) + " CoreDump=" + String . valueOf ( bar . read ( ) != 0 ) + " Message=" + bar . readString ( ) ; } finally { try { bar . close ( ) ; } catch ( IOException e ) { } } } } if ( requesttype . equals ( "xon-xoff" ) ) { flowControlEnabled = ( requestdata != null && requestdata [ 0 ] != 0 ) ; } super . channelRequest ( requesttype , wantreply , requestdata ) ; } catch ( IOException ex ) { throw new SshException ( ex , SshException . INTERNAL_ERROR ) ; } }
This overidden method handles the exit - status exit - signal and xon - xoff channel requests .