protected void channelRequest ( String requesttype , boolean wantreply , byte [ ] requestdata ) throws SshException { if ( wantreply ) { ByteArrayWriter msg = new ByteArrayWriter ( ) ; try { msg . write ( ( byte ) SSH_MSG_CHANNEL_FAILURE ) ; msg . writeInt ( remoteid ) ; connection . sendMessage ( msg . toByteArray ( ) , true ) ; } catch ( IOException e ) { throw new SshException ( e , SshException . INTERNAL_ERROR ) ; } finally { try { msg . close ( ) ; } catch ( IOException e ) { } } } }
Called when a channel request is received by default this method sends a failure message if the remote side requests a reply . Overidden methods should ALWAYS call this superclass method .