Secure iNet Factory

com.jscape.inet.ssh.connection.channels
Class TcpChannel

java.lang.Object
  extended by com.jscape.inet.ssh.connection.channels.Channel
      extended by com.jscape.inet.ssh.connection.channels.TcpChannel

public class TcpChannel
extends Channel

Version:
1.0
Author:
Alex Usun

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jscape.inet.ssh.connection.channels.Channel
Channel.ChannelClosedListener, Channel.DataOutputStream, Channel.Parameters
 
Method Summary
static TcpChannel createDirect(long windowSize, long packetSize, ConnectionParameters connectionParams, ConnectionParameters originatorParams, Connection connection)
          Creates a new direct TCP channel.
static TcpChannel createForwarded(long windowSize, long packetSize, com.jscape.inet.ssh.connection.messages.SshMsgChannelOpen request, Connection connection)
          Creates a new direct TCP channel.
 java.lang.String getConnectionHost()
          Obtains the connected host name.
 int getConnectionPort()
          Obtains the connected port value.
 java.lang.String getOriginatorHost()
          Obtains the origiantor host address.
 int getOriginatorPort()
          Obtains the origiantor port value.
 
Methods inherited from class com.jscape.inet.ssh.connection.channels.Channel
close, getConnection, getIncomingWindow, getInputStream, getLocalNo, getOutputStream, getParameters, getReadTimeout, getRemoteNo, getType, hashCode, isClosed, onMessage, sendRequest, setChannelClosedListener, setReadTimeout
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createDirect

public static TcpChannel createDirect(long windowSize,
                                      long packetSize,
                                      ConnectionParameters connectionParams,
                                      ConnectionParameters originatorParams,
                                      Connection connection)
                               throws java.io.IOException,
                                      ConnectionException
Creates a new direct TCP channel.

Parameters:
windowSize - the channel initial window size
packetSize - the max packet sise
connectionParams - the target connection parameters
originatorParams - the connection originator parameters
connection - the underlayed SSH connection
Returns:
the opened direct TCP channel
Throws:
java.io.IOException - if an I/O error occurs
ConnectionException - if the channel cannot be opened

createForwarded

public static TcpChannel createForwarded(long windowSize,
                                         long packetSize,
                                         com.jscape.inet.ssh.connection.messages.SshMsgChannelOpen request,
                                         Connection connection)
                                  throws java.io.IOException
Creates a new direct TCP channel.

Parameters:
windowSize - the channel initial window size
packetSize - the max packet sise
request - the open channel request
connection - the underlayed SSH connection
Returns:
the opened direct TCP channel
Throws:
java.io.IOException - if an I/O error occurs

getConnectionHost

public java.lang.String getConnectionHost()
Obtains the connected host name.

Returns:
the connected host name

getConnectionPort

public int getConnectionPort()
Obtains the connected port value.

Returns:
the connected port value

getOriginatorHost

public java.lang.String getOriginatorHost()
Obtains the origiantor host address.

Returns:
the connected host address

getOriginatorPort

public int getOriginatorPort()
Obtains the origiantor port value.

Returns:
the originator port value

Secure iNet Factory

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