com.jscape.inet.ssh.connection
Class ConnectionClient
java.lang.Object
com.jscape.inet.ssh.connection.Connection
com.jscape.inet.ssh.connection.ConnectionClient
public class ConnectionClient
- extends Connection
- Version:
- 1.0
- Author:
- Natalya Okhremchuk
Fields inherited from class com.jscape.inet.ssh.connection.Connection |
NAME |
Methods inherited from class com.jscape.inet.ssh.connection.Connection |
addChannel, addChannelHandler, addGlobalHandler, close, containsChannelHandler, containsGlobalHandler, getNextChannelId, getTransport, globalRequest, isClosed, removeChannel, removeChannelHandler, removeGlobalHandler, requestChannel, sendMessage, setConnectionClosedListener |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionClient
public ConnectionClient(Transport transport,
ConnectionConfiguration config)
- Creates a new client instance.
- Parameters:
transport
- the SSH transportconfig
- the connection layer logger
openSession
public SessionClient openSession(long windowSize,
int packetSize)
throws java.io.IOException
- Opens a new session channel.
- Parameters:
windowSize
- the channel initial window sizepacketSize
- the channel max packet size
- Returns:
- the opened channel
- Throws:
ConnectionException
java.io.IOException
openRemotePort
public RemotePort openRemotePort(java.net.InetAddress address,
int port)
throws java.io.IOException
- Opens the remote TCP port.
- Parameters:
address
- the allowed addressesport
- the port to bind
- Returns:
- the remote port instance
- Throws:
java.io.IOException
- if an I/O error occurs
ConnectionException
- if the remote port cannot be opened
openRemoteConnection
public Channel openRemoteConnection(int windowSize,
int packetSize,
ConnectionParameters connectionParams,
ConnectionParameters originatorParams)
throws java.io.IOException
- Opens a remote TCP connection.
- Parameters:
windowSize
- the channel initial window sizepacketSize
- the channel max packet sizeconnectionParams
- the target connection parametersoriginatorParams
- the connection originator parameters
- Returns:
- the opened direct TCP channel
- Throws:
java.io.IOException
- if an I/O error occurs
ConnectionException
- if the channel cannot be opened
openRemoteConnection
public Channel openRemoteConnection(int windowSize,
int packetSize,
ConnectionParameters connectionParams)
throws java.io.IOException
- Opens a remote TCP connection with local host as originator.
- Parameters:
windowSize
- the channel initial window sizepacketSize
- the channel max packet sizeconnectionParams
- the target connection parameters
- Returns:
- the opened direct TCP channel
- Throws:
java.io.IOException
- if an I/O error occurs
ConnectionException
- if the channel cannot be opened
getServerVersion
public ProtocolVersion getServerVersion()
- Returns the server protocol version.
- Returns:
- the server protocol version
Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved