Class CallbackForwardingChannel<T extends com.sshtools.synergy.ssh.SshContext>

java.lang.Object
com.sshtools.synergy.ssh.ChannelNG<T>
com.sshtools.synergy.ssh.ForwardingChannel<T>
com.sshtools.server.callback.CallbackForwardingChannel<T>
All Implemented Interfaces:
com.sshtools.common.ssh.Channel

public class CallbackForwardingChannel<T extends com.sshtools.synergy.ssh.SshContext> extends com.sshtools.synergy.ssh.ForwardingChannel<T>
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.sshtools.synergy.ssh.ChannelNG

    com.sshtools.synergy.ssh.ChannelNG.ChannelInputStream
  • Field Summary

    Fields inherited from class com.sshtools.synergy.ssh.ForwardingChannel

    hostToConnect, originatingHost, originatingPort, portToConnect

    Fields inherited from class com.sshtools.synergy.ssh.ChannelNG

    cache, con, connection, localWindow, remoteWindow
  • Constructor Summary

    Constructors
    Constructor
    Description
    CallbackForwardingChannel(com.sshtools.common.ssh.Context ctx, com.sshtools.common.ssh.SshConnection callbackClient)
     
    CallbackForwardingChannel(com.sshtools.common.ssh.Context ctx, com.sshtools.common.ssh.SshConnection callbackClient, String hostToConnect, int portToConnect)
     
    CallbackForwardingChannel(String channelType, com.sshtools.common.ssh.SshConnection con, String hostToConnect, int portToConnect)
    Constructs a forwarding channel of the type "forwarded-tcpip"
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    protected byte[]
    Create the forwarding channel.
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
     
    protected void
    Called when the channel has been confirmed as open.
    protected void
     
    protected void
    onChannelRequest(String type, boolean wantreply, byte[] requestdata)
     
    protected void
     
    protected void
    Called when the forwarded sockets selector has been registered with a {@link com,maverick.nio.SelectorThread}.
    protected void
     
    protected byte[]
    openChannel(byte[] requestdata)
    Open a forwarding channel.
    void
     

    Methods inherited from class com.sshtools.synergy.ssh.ForwardingChannel

    checkWindowSpace, getHost, getOriginatingHost, getOriginatingPort, getPort

    Methods inherited from class com.sshtools.synergy.ssh.ChannelNG

    addEventListener, canClose, clearIdleState, close, close, close, createCache, disposeCache, evaluateWindowSpace, getChannelType, getCloseFuture, getConnection, getConnectionProtocol, getContext, getInputStream, getLastActivity, getLocalId, getLocalPacket, getLocalWindow, getMaxiumRemotePacketSize, getMaxiumRemoteWindowSize, getOpenFuture, getOutputStream, getRemoteId, getRemotePacket, getRemoteWindow, getSessionIdentifier, getTimeout, haltIncomingData, isAutoConsume, isClosed, isClosing, isConnected, isIncomingDataHalted, isLocalEOF, isOpen, isRemoteEOF, log, log, log, log, logMessage, logMessage, onChannelError, onExtendedData, onRemoteClose, onWindowAdjust, processChannelRequestResponse, registerExtendedDataType, resetIdleState, resumeIncomingData, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelDataAndBlock, sendChannelRequest, sendChannelRequest, sendData, sendEOF, sendExtendedData, sendExtendedData, sendRequestResponse, sendWindowAdjust, sendWindowAdjust, setTimeout

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CallbackForwardingChannel

      public CallbackForwardingChannel(com.sshtools.common.ssh.Context ctx, com.sshtools.common.ssh.SshConnection callbackClient)
    • CallbackForwardingChannel

      public CallbackForwardingChannel(com.sshtools.common.ssh.Context ctx, com.sshtools.common.ssh.SshConnection callbackClient, String hostToConnect, int portToConnect)
    • CallbackForwardingChannel

      public CallbackForwardingChannel(String channelType, com.sshtools.common.ssh.SshConnection con, String hostToConnect, int portToConnect)
      Constructs a forwarding channel of the type "forwarded-tcpip"
      Parameters:
      addressToBind - String
      portToBind - int
      socketChannel - SocketChannel
  • Method Details

    • setBoundChannel

      public void setBoundChannel(CallbackForwardingChannel<?> channel)
    • createChannel

      protected byte[] createChannel() throws IOException
      Create the forwarding channel.
      Specified by:
      createChannel in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
      Returns:
      byte[]
      Throws:
      IOException
    • openChannel

      protected byte[] openChannel(byte[] requestdata) throws com.sshtools.common.nio.WriteOperationRequest, com.sshtools.common.ssh.ChannelOpenException
      Open a forwarding channel.
      Specified by:
      openChannel in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
      Parameters:
      requestdata - byte[]
      Returns:
      byte[]
      Throws:
      com.sshtools.common.nio.WriteOperationRequest
      com.sshtools.common.ssh.ChannelOpenException
    • checkPermissions

      protected boolean checkPermissions()
    • onRegistrationComplete

      protected void onRegistrationComplete()
      Called when the forwarded sockets selector has been registered with a {@link com,maverick.nio.SelectorThread}.
    • onChannelOpenConfirmation

      protected void onChannelOpenConfirmation()
      Called when the channel has been confirmed as open.
      Specified by:
      onChannelOpenConfirmation in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelData

      protected void onChannelData(ByteBuffer data)
      Overrides:
      onChannelData in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelOpenFailure

      protected void onChannelOpenFailure()
      Overrides:
      onChannelOpenFailure in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelFree

      protected void onChannelFree()
      Specified by:
      onChannelFree in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelClosed

      protected void onChannelClosed()
      Specified by:
      onChannelClosed in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelOpen

      protected void onChannelOpen()
      Specified by:
      onChannelOpen in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelClosing

      protected void onChannelClosing()
      Specified by:
      onChannelClosing in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onChannelRequest

      protected void onChannelRequest(String type, boolean wantreply, byte[] requestdata)
      Specified by:
      onChannelRequest in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onRemoteEOF

      protected void onRemoteEOF()
      Specified by:
      onRemoteEOF in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>
    • onLocalEOF

      protected void onLocalEOF()
      Specified by:
      onLocalEOF in class com.sshtools.synergy.ssh.ChannelNG<T extends com.sshtools.synergy.ssh.SshContext>