Secure iNet Factory

com.jscape.inet.ssh
Class SshConnector

java.lang.Object
  extended by com.jscape.inet.ssh.SshConnector
All Implemented Interfaces:
com.jscape.inet.util.connection.Connector

public class SshConnector
extends java.lang.Object
implements com.jscape.inet.util.connection.Connector

SSH connector.

Version:
1.0
Author:
Alex
See Also:
Source code

Constructor Summary
SshConnector(SshConfiguration configuration, ConnectionParameters connectionParameters, User user, ChannelRequest channelRequest)
          Creates a new connector instance.
 
Method Summary
 void close()
          Closes connector.
 java.lang.String getAddress()
          Returns connector address.
 ChannelRequest getChannelRequest()
          Returns current channel request.
 SshConfiguration getConfiguration()
          Returns current configuration.
 ConnectionParameters getConnectionParameters()
          Returns current connection parameters.
 int getPort()
          Returns connector port.
 long getTimeout()
          Returns connector timeout.
 User getUser()
          Returns current user.
 boolean isClosed()
           
 com.jscape.inet.util.connection.Connection openConnection()
          Opens connection.
 void setChannelRequest(ChannelRequest channelRequest)
          Sets channel request.
 void setTimeout(long timeout)
          Setups connector timeout.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshConnector

public SshConnector(SshConfiguration configuration,
                    ConnectionParameters connectionParameters,
                    User user,
                    ChannelRequest channelRequest)
             throws java.io.IOException
Creates a new connector instance.

Parameters:
configuration - configuration
connectionParameters - connection parameters
user - user
channelRequest - channel request
Throws:
java.io.IOException - if an I/O error occurs
Method Detail

getConfiguration

public SshConfiguration getConfiguration()
Returns current configuration.

Returns:
current configuration

getConnectionParameters

public ConnectionParameters getConnectionParameters()
Returns current connection parameters.

Returns:
current connection parameters

getUser

public User getUser()
Returns current user.

Returns:
current user.

getChannelRequest

public ChannelRequest getChannelRequest()
Returns current channel request.

Returns:
current channel request.

setChannelRequest

public void setChannelRequest(ChannelRequest channelRequest)
Sets channel request.

Parameters:
channelRequest - channel request

getAddress

public java.lang.String getAddress()
Description copied from interface: com.jscape.inet.util.connection.Connector
Returns connector address.

Specified by:
getAddress in interface com.jscape.inet.util.connection.Connector
Returns:
connector address
See Also:
Connector.getAddress()

getPort

public int getPort()
Description copied from interface: com.jscape.inet.util.connection.Connector
Returns connector port.

Specified by:
getPort in interface com.jscape.inet.util.connection.Connector
Returns:
connector port
See Also:
Connector.getPort()

getTimeout

public long getTimeout()
Description copied from interface: com.jscape.inet.util.connection.Connector
Returns connector timeout.

Specified by:
getTimeout in interface com.jscape.inet.util.connection.Connector
Returns:
connector timeout
See Also:
Connector.getTimeout()

setTimeout

public void setTimeout(long timeout)
                throws java.io.IOException
Description copied from interface: com.jscape.inet.util.connection.Connector
Setups connector timeout.

Specified by:
setTimeout in interface com.jscape.inet.util.connection.Connector
Parameters:
timeout - new timeout value
Throws:
java.io.IOException - if an error occurs
See Also:
Connector.setTimeout(long)

isClosed

public boolean isClosed()
See Also:
Connection.isClosed()

openConnection

public com.jscape.inet.util.connection.Connection openConnection()
                                                          throws java.io.IOException
Description copied from interface: com.jscape.inet.util.connection.Connector
Opens connection.

Specified by:
openConnection in interface com.jscape.inet.util.connection.Connector
Returns:
opened connection
Throws:
java.io.IOException - if an I/O error occurs
See Also:
Connector.openConnection()

close

public void close()
Description copied from interface: com.jscape.inet.util.connection.Connector
Closes connector.

Specified by:
close in interface com.jscape.inet.util.connection.Connector
See Also:
Connector.close()

Secure iNet Factory

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