Class DefaultServerChannelFactory

java.lang.Object
com.sshtools.server.DefaultServerChannelFactory
All Implemented Interfaces:
com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
Direct Known Subclasses:
VirtualChannelFactory

public class DefaultServerChannelFactory extends Object implements com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
  • Field Details

    • LOCAL_FORWARDING_CHANNEL_TYPE

      public static final String LOCAL_FORWARDING_CHANNEL_TYPE
      See Also:
    • commands

      protected com.sshtools.common.ssh.components.ComponentFactory<com.sshtools.common.command.ExecutableCommand> commands
  • Constructor Details

    • DefaultServerChannelFactory

      public DefaultServerChannelFactory()
  • Method Details

    • addListener

      public DefaultServerChannelFactory addListener(com.sshtools.synergy.ssh.ChannelFactoryListener<SshServerContext> listener)
    • removeListener

      public void removeListener(com.sshtools.synergy.ssh.ChannelFactoryListener<SshServerContext> listener)
    • supportedCommands

      public com.sshtools.common.ssh.components.ComponentFactory<com.sshtools.common.command.ExecutableCommand> supportedCommands()
      Specified by:
      supportedCommands in interface com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
    • createChannel

      public final com.sshtools.synergy.ssh.ChannelNG<SshServerContext> createChannel(String channeltype, com.sshtools.common.ssh.SshConnection con) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.ssh.ChannelOpenException
      Specified by:
      createChannel in interface com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
      Throws:
      com.sshtools.common.ssh.UnsupportedChannelException
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.ssh.ChannelOpenException
    • onChannelCreated

      protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext> onChannelCreated(com.sshtools.synergy.ssh.ChannelNG<SshServerContext> channel)
    • createLocalForwardingChannel

      protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext> createLocalForwardingChannel(com.sshtools.common.ssh.SshConnection con)
    • onCreateChannel

      protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext> onCreateChannel(String channeltype, com.sshtools.common.ssh.SshConnection con) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException
      Throws:
      com.sshtools.common.ssh.UnsupportedChannelException
      com.sshtools.common.permissions.PermissionDeniedException
    • createSessionChannel

      protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext> createSessionChannel(com.sshtools.common.ssh.SshConnection con) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.ssh.ChannelOpenException
      Throws:
      com.sshtools.common.ssh.UnsupportedChannelException
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.ssh.ChannelOpenException
    • createSubsystem

      public com.sshtools.common.ssh.Subsystem createSubsystem(String name, com.sshtools.common.ssh.SessionChannel session) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException
      Specified by:
      createSubsystem in interface com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
      Throws:
      com.sshtools.common.ssh.UnsupportedChannelException
      com.sshtools.common.permissions.PermissionDeniedException
    • createSftpSubsystem

      protected com.sshtools.common.sftp.SftpSubsystem createSftpSubsystem(com.sshtools.common.ssh.SessionChannel session) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException
      Throws:
      com.sshtools.common.ssh.UnsupportedChannelException
      com.sshtools.common.permissions.PermissionDeniedException
    • createPublicKeySubsystem

      protected PublicKeySubsystem createPublicKeySubsystem(com.sshtools.common.ssh.SessionChannel session) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException
      Throws:
      com.sshtools.common.ssh.UnsupportedChannelException
      com.sshtools.common.permissions.PermissionDeniedException
    • executeCommand

      public com.sshtools.common.command.ExecutableCommand executeCommand(com.sshtools.common.ssh.SessionChannel sessionChannel, String[] args, Map<String,String> environment) throws com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.ssh.UnsupportedChannelException
      Specified by:
      executeCommand in interface com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
      Throws:
      com.sshtools.common.permissions.PermissionDeniedException
      com.sshtools.common.ssh.UnsupportedChannelException