public class ConnectionProtocolClient extends ConnectionProtocol<SshClientContext>
con, outstandingRequests, SERVICE_NAME, usernameCALLBACKS, EVENTS, MESSAGES_INCOMING, MESSAGES_OUTGOING| Constructor and Description |
|---|
ConnectionProtocolClient(TransportProtocol<SshClientContext> transport,
java.lang.String username) |
| Modifier and Type | Method and Description |
|---|---|
protected ChannelNG<SshClientContext> |
createChannel(java.lang.String channeltype,
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, stopaddIncomingTask, addOutgoingTask, addTask, cleanupOperationspublic ConnectionProtocolClient(TransportProtocol<SshClientContext> transport, java.lang.String username)
protected boolean isClient()
isClient in class ConnectionProtocol<SshClientContext>protected void onStart()
onStart in class ConnectionProtocol<SshClientContext>protected void onStop()
onStop in class ConnectionProtocol<SshClientContext>public int startLocalForwarding(java.lang.String addressToBind,
int portToBind,
java.lang.String destinationHost,
int destinationPort)
throws UnauthorizedException,
SshException
addressToBind - portToBind - destinationHost - destinationPort - UnauthorizedExceptionSshExceptionpublic 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 SshException
SshExceptionpublic void stopRemoteForwarding()
public int startRemoteForwarding(java.lang.String addressToBind,
int portToBind,
java.lang.String destinationHost,
int destinationPort)
throws SshException
addressToBind - portToBind - destinationHost - destinationPort - SshExceptionpublic SshClientContext getContext()
getContext in class ConnectionProtocol<SshClientContext>protected boolean processTCPIPCancel(com.sshtools.common.util.ByteArrayReader bar,
com.sshtools.common.util.ByteArrayWriter msg)
throws java.io.IOException
processTCPIPCancel in class ConnectionProtocol<SshClientContext>java.io.IOExceptionprotected boolean processTCPIPForward(com.sshtools.common.util.ByteArrayReader bar,
com.sshtools.common.util.ByteArrayWriter response)
throws java.io.IOException
processTCPIPForward in class ConnectionProtocol<SshClientContext>java.io.IOExceptionpublic java.lang.String getName()
protected ChannelNG<SshClientContext> createChannel(java.lang.String channeltype, Connection<SshClientContext> con) throws UnsupportedChannelException, PermissionDeniedException, ChannelOpenException
createChannel in class ConnectionProtocol<SshClientContext>ChannelOpenExceptionUnsupportedChannelExceptionPermissionDeniedExceptionCopyright © 2022. All rights reserved.