Package com.sshtools.server.callback
Class CallbackServer
java.lang.Object
com.sshtools.server.AbstractSshServer
com.sshtools.server.callback.CallbackServer
- All Implemented Interfaces:
Closeable
,AutoCloseable
An abstract server that provides a callback facility, listening on a port and acting as a client to
any callback clients that connect to it. The callback client similarly acts as a server allowing
this server to perform operations on the remote client.
The server also has the facility to act as a normal server. Switching modes depending on the
client identifier provided by the SSH client.
-
Field Summary
Fields inherited from class com.sshtools.server.AbstractSshServer
fileFactory
-
Constructor Summary
ConstructorsConstructorDescriptionCallbackServer
(int port) CallbackServer
(String addressToBind, int port) CallbackServer
(InetAddress addressToBind, int port) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAgentKey
(String username, com.sshtools.common.ssh.components.SshKeyPair privateKey, com.sshtools.common.ssh.components.SshPublicKey publicKey) com.sshtools.synergy.ssh.ChannelFactory<SshServerContext>
com.sshtools.synergy.nio.ProtocolContextFactory<?>
com.sshtools.common.policy.FileFactory
Methods inherited from class com.sshtools.server.AbstractSshServer
addAuthenticator, addGlobalRequestHandler, addHostKey, addHostKeys, addHostKeys, addInterface, addInterface, afterStart, beforeStart, close, configure, configureAuthentication, configureChannels, configureFilesystem, configureForwarding, configureHostKeys, createServerContext, disableSCP, enableSCP, getEngine, getForwardingPolicy, getHostKeys, getIPPolicy, getPort, getSecurityLevel, getShutdownFuture, isRunning, removeInterface, setChannelFactory, setConfigFolder, setFileFactory, setIPPolicy, setSecurityLevel, start, start, stop
-
Constructor Details
-
CallbackServer
public CallbackServer() -
CallbackServer
-
CallbackServer
- Throws:
UnknownHostException
-
CallbackServer
- Throws:
UnknownHostException
-
-
Method Details
-
getDefaultContextFactory
public com.sshtools.synergy.nio.ProtocolContextFactory<?> getDefaultContextFactory()- Specified by:
getDefaultContextFactory
in classAbstractSshServer
-
getFileFactory
public com.sshtools.common.policy.FileFactory getFileFactory()- Overrides:
getFileFactory
in classAbstractSshServer
-
getChannelFactory
- Overrides:
getChannelFactory
in classAbstractSshServer
-
addAgentKey
public void addAgentKey(String username, com.sshtools.common.ssh.components.SshKeyPair privateKey, com.sshtools.common.ssh.components.SshPublicKey publicKey)
-