Package com.sshtools.server
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 Summary
FieldsModifier and TypeFieldDescriptionprotected com.sshtools.common.ssh.components.ComponentFactory<com.sshtools.common.command.ExecutableCommand>
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddListener
(com.sshtools.synergy.ssh.ChannelFactoryListener<SshServerContext> listener) final com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
createChannel
(String channeltype, com.sshtools.common.ssh.SshConnection con) protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
createLocalForwardingChannel
(com.sshtools.common.ssh.SshConnection con) protected PublicKeySubsystem
createPublicKeySubsystem
(com.sshtools.common.ssh.SessionChannel session) protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
createSessionChannel
(com.sshtools.common.ssh.SshConnection con) protected com.sshtools.common.sftp.SftpSubsystem
createSftpSubsystem
(com.sshtools.common.ssh.SessionChannel session) com.sshtools.common.ssh.Subsystem
createSubsystem
(String name, com.sshtools.common.ssh.SessionChannel session) com.sshtools.common.command.ExecutableCommand
executeCommand
(com.sshtools.common.ssh.SessionChannel sessionChannel, String[] args, Map<String, String> environment) protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
onChannelCreated
(com.sshtools.synergy.ssh.ChannelNG<SshServerContext> channel) protected com.sshtools.synergy.ssh.ChannelNG<SshServerContext>
onCreateChannel
(String channeltype, com.sshtools.common.ssh.SshConnection con) void
removeListener
(com.sshtools.synergy.ssh.ChannelFactoryListener<SshServerContext> listener) com.sshtools.common.ssh.components.ComponentFactory<com.sshtools.common.command.ExecutableCommand>
-
Field Details
-
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 interfacecom.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 interfacecom.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 interfacecom.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 interfacecom.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
- Throws:
com.sshtools.common.permissions.PermissionDeniedException
com.sshtools.common.ssh.UnsupportedChannelException
-