Secure iNet Factory

com.jscape.inet.ssh.connection
Class ConnectionClient

java.lang.Object
  extended by com.jscape.inet.ssh.connection.Connection
      extended by com.jscape.inet.ssh.connection.ConnectionClient

public class ConnectionClient
extends Connection

Version:
1.0
Author:
Natalya Okhremchuk

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jscape.inet.ssh.connection.Connection
Connection.ConnectionClosedListener
 
Field Summary
 
Fields inherited from class com.jscape.inet.ssh.connection.Connection
NAME
 
Constructor Summary
ConnectionClient(Transport transport, ConnectionConfiguration config)
          Creates a new client instance.
 
Method Summary
 ProtocolVersion getServerVersion()
          Returns the server protocol version.
 Channel openRemoteConnection(int windowSize, int packetSize, ConnectionParameters connectionParams)
          Opens a remote TCP connection with local host as originator.
 Channel openRemoteConnection(int windowSize, int packetSize, ConnectionParameters connectionParams, ConnectionParameters originatorParams)
          Opens a remote TCP connection.
 RemotePort openRemotePort(java.net.InetAddress address, int port)
          Opens the remote TCP port.
 SessionClient openSession(long windowSize, int packetSize)
          Opens a new session channel.
 
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
 

Constructor Detail

ConnectionClient

public ConnectionClient(Transport transport,
                        ConnectionConfiguration config)
Creates a new client instance.

Parameters:
transport - the SSH transport
config - the connection layer logger
Method Detail

openSession

public SessionClient openSession(long windowSize,
                                 int packetSize)
                          throws java.io.IOException
Opens a new session channel.

Parameters:
windowSize - the channel initial window size
packetSize - 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 addresses
port - 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 size
packetSize - the channel max packet size
connectionParams - the target connection parameters
originatorParams - 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 size
packetSize - the channel max packet size
connectionParams - 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

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved