Secure iNet Factory

com.jscape.inet.ssh.transport
Class Transport

java.lang.Object
  extended by com.jscape.inet.ssh.transport.Transport
Direct Known Subclasses:
TransportClient

public abstract class Transport
extends java.lang.Object

Version:
1.0
Author:
Alex Usun

Method Summary
 void close()
           
 void exchangeKeys()
           
abstract  ProtocolVersion getClientVersion()
           
 AlgorithmSuite getCurrentSuite()
           
 HostKeyVerifier getHostKeyVerifier()
          Returns current host key verifier.
 long getReceivedBytesCount()
          Obtains the received bytes value.
 long getSentBytesCount()
          Obtains the sent bytes value.
abstract  ProtocolVersion getServerVersion()
           
 byte[] getSessionId()
          Obtains the current session ID.
 java.net.Socket getSocket()
          Gets underlying Socket for this connection
 boolean isClosed()
           
 boolean knowsMessage(int type)
          Checks if the specified message is already registered.
 Message receiveMessage()
           
 void registerMessage(int type, java.lang.Class messageClass)
          Registers the message to the transport so it can read the specified message.
 void sendMessage(Message msg)
           
 void unregisterMessage(int type)
          Uregisters the message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSocket

public java.net.Socket getSocket()
Gets underlying Socket for this connection

Returns:
the socket

exchangeKeys

public void exchangeKeys()
                  throws java.io.IOException
Throws:
java.io.IOException

close

public void close()

isClosed

public boolean isClosed()
Returns:
is closed

sendMessage

public void sendMessage(Message msg)
                 throws java.io.IOException
Parameters:
msg -
Throws:
java.io.IOException

receiveMessage

public Message receiveMessage()
                       throws java.io.IOException
Returns:
Message instance
Throws:
java.io.IOException

getSessionId

public byte[] getSessionId()
Obtains the current session ID.

Returns:
the current session ID

getSentBytesCount

public long getSentBytesCount()
Obtains the sent bytes value.

Returns:
the sent bytes value

getReceivedBytesCount

public long getReceivedBytesCount()
Obtains the received bytes value.

Returns:
the received bytes value

getCurrentSuite

public AlgorithmSuite getCurrentSuite()
Returns:
AlgorithmSuite

registerMessage

public void registerMessage(int type,
                            java.lang.Class messageClass)
Registers the message to the transport so it can read the specified message.

Parameters:
type - the message type code
messageClass - the message class

unregisterMessage

public void unregisterMessage(int type)
Uregisters the message.

Parameters:
type - the message type code

knowsMessage

public boolean knowsMessage(int type)
Checks if the specified message is already registered.

Parameters:
type - the messsage type code
Returns:
true if the message is already registered; false otherwise

getClientVersion

public abstract ProtocolVersion getClientVersion()
Returns:
ProtocolVersion

getServerVersion

public abstract ProtocolVersion getServerVersion()
Returns:
ProtocolVersion

getHostKeyVerifier

public HostKeyVerifier getHostKeyVerifier()
Returns current host key verifier.

Returns:
current host key verifier

Secure iNet Factory

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