public class ConnectionProtocolClient extends com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
Constructor and Description |
---|
ConnectionProtocolClient(com.sshtools.synergy.ssh.TransportProtocol<SshClientContext> transport,
java.lang.String username) |
Modifier and Type | Method and Description |
---|---|
protected com.sshtools.synergy.ssh.ChannelNG<SshClientContext> |
createChannel(java.lang.String channeltype,
com.sshtools.synergy.ssh.Connection<SshClientContext> con)
Create an SSH channel.
|
SshClientContext |
getContext() |
java.lang.String |
getName()
The name of the ssh service i.e.
|
protected boolean |
isClient() |
protected void |
onStart() |
protected void |
onStop() |
protected boolean |
processTCPIPCancel(com.sshtools.common.util.ByteArrayReader bar,
com.sshtools.common.util.ByteArrayWriter msg)
Process remote forwarding cancel request.
|
protected boolean |
processTCPIPForward(com.sshtools.common.util.ByteArrayReader bar,
com.sshtools.common.util.ByteArrayWriter response)
Process a request for remote forwarding.
|
int |
startLocalForwarding(java.lang.String addressToBind,
int portToBind,
java.lang.String destinationHost,
int destinationPort)
Start local port forwarding.
|
int |
startRemoteForwarding(java.lang.String addressToBind,
int portToBind,
java.lang.String destinationHost,
int destinationPort)
Start remote port forwarding.
|
void |
stopLocalForwarding() |
void |
stopLocalForwarding(java.lang.String key) |
void |
stopLocalForwarding(java.lang.String addressToBind,
int portToBind) |
void |
stopRemoteForwarding() |
void |
stopRemoteForwarding(java.lang.String addressToBind,
int portToBind) |
addGlobalRequestHandler, disconnect, getActiveChannels, getConnection, getIdleLog, getIdleTimeoutSeconds, getLocalAddress, getLocalPort, getMaxChannels, getQueueSize, getRemoteAddress, getSessionIdentifier, getTransport, getUsername, getUUID, idle, openChannel, processGlobalRequestFailure, processGlobalRequestSuccess, processMessage, sendChannelOpenConfirmation, sendChannelOpenFailure, sendGlobalRequest, start, stop
public ConnectionProtocolClient(com.sshtools.synergy.ssh.TransportProtocol<SshClientContext> transport, java.lang.String username)
protected boolean isClient()
isClient
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
protected void onStart()
onStart
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
protected void onStop()
onStop
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
public int startLocalForwarding(java.lang.String addressToBind, int portToBind, java.lang.String destinationHost, int destinationPort) throws com.sshtools.common.permissions.UnauthorizedException, com.sshtools.common.ssh.SshException
addressToBind
- portToBind
- destinationHost
- destinationPort
- com.sshtools.common.permissions.UnauthorizedException
com.sshtools.common.ssh.SshException
public void stopLocalForwarding()
public void stopLocalForwarding(java.lang.String addressToBind, int portToBind)
public void stopLocalForwarding(java.lang.String key)
public void stopRemoteForwarding(java.lang.String addressToBind, int portToBind) throws com.sshtools.common.ssh.SshException
com.sshtools.common.ssh.SshException
public void stopRemoteForwarding()
public int startRemoteForwarding(java.lang.String addressToBind, int portToBind, java.lang.String destinationHost, int destinationPort) throws com.sshtools.common.ssh.SshException
addressToBind
- portToBind
- destinationHost
- destinationPort
- com.sshtools.common.ssh.SshException
public SshClientContext getContext()
getContext
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
protected boolean processTCPIPCancel(com.sshtools.common.util.ByteArrayReader bar, com.sshtools.common.util.ByteArrayWriter msg) throws java.io.IOException
processTCPIPCancel
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
java.io.IOException
protected boolean processTCPIPForward(com.sshtools.common.util.ByteArrayReader bar, com.sshtools.common.util.ByteArrayWriter response) throws java.io.IOException
processTCPIPForward
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
java.io.IOException
public java.lang.String getName()
protected com.sshtools.synergy.ssh.ChannelNG<SshClientContext> createChannel(java.lang.String channeltype, com.sshtools.synergy.ssh.Connection<SshClientContext> con) throws com.sshtools.common.ssh.UnsupportedChannelException, com.sshtools.common.permissions.PermissionDeniedException, com.sshtools.common.ssh.ChannelOpenException
createChannel
in class com.sshtools.synergy.ssh.ConnectionProtocol<SshClientContext>
com.sshtools.common.ssh.ChannelOpenException
com.sshtools.common.ssh.UnsupportedChannelException
com.sshtools.common.permissions.PermissionDeniedException
Copyright © 2024. All rights reserved.