Secure iNet Factory

com.jscape.inet.util
Class ConnectionParameters

java.lang.Object
  extended by com.jscape.inet.util.ConnectionParameters
All Implemented Interfaces:
java.io.Serializable

public class ConnectionParameters
extends java.lang.Object
implements java.io.Serializable

SSH connection parameters container.

Version:
1.0
Author:
Alex Usun
See Also:
Serialized Form

Field Summary
static long INFINITE_TIMEOUT
          Infinite timeout value.
 
Constructor Summary
ConnectionParameters(ConnectionParameters that)
          Copy constructor.
ConnectionParameters(java.lang.String host, int port)
          Creates a new parameters instance.
ConnectionParameters(java.lang.String host, int port, int sendBuffer, int receiveBuffer)
          Creates a new parameters instance.
ConnectionParameters(java.lang.String host, int port, long timeout)
          Creates a new parameters instance.
ConnectionParameters(java.lang.String host, int port, long timeout, int sendBuffer, int receiveBuffer)
          Creates a new parameters instance.
ConnectionParameters(java.lang.String host, int port, long connectionTimeout, long soTimeout, int sendBuffer, int receiveBuffer, java.lang.Integer trafficClass, java.lang.Boolean tcpNoDelay, java.lang.String proxyHost, int proxyPort, java.lang.String proxyUserId, java.lang.String proxyPassword, java.lang.String proxyType)
           
ConnectionParameters(java.lang.String host, int port, long connectionTimeout, long soTimeout, int sendBuffer, int receiveBuffer, java.lang.Integer trafficClass, java.lang.Boolean tcpNoDelay, java.lang.String proxyHost, int proxyPort, java.lang.String proxyUserId, java.lang.String proxyPassword, java.lang.String proxyType, long minIncomingWindowSize, long maxIncomingWindowSize)
           
ConnectionParameters(java.lang.String host, int port, long connectionTimeout, long soTimeout, int sendBuffer, int receiveBuffer, java.lang.String proxyHost, int proxyPort, java.lang.String proxyUserId, java.lang.String proxyPassword, java.lang.String proxyType)
           
ConnectionParameters(java.lang.String host, int port, long timeout, java.lang.String proxyHost, int proxyPort, java.lang.String proxyUserId, java.lang.String proxyPassword, java.lang.String proxyType)
           
 
Method Summary
 java.net.Socket createSocket()
          Creates a new connected socket.
 long getConnectionTimeout()
          Obtains connection timeout value.
 java.lang.String getHost()
          Obtains target SSH host name.
 long getMaxIncomingWindowSize()
          Get maximum incoming window size.
 long getMinIncomingWindowSize()
          Get minimum incoming window size.
 int getPort()
          Obtains target SSH port.
 java.lang.String getProxyHost()
          Gets proxy hostname.
 java.lang.String getProxyPassword()
          Gets the proxy authentication password.
 int getProxyPort()
          Gets the proxy port.
 java.lang.String getProxyType()
          Gets the proxy type: SOCKS5, HTTP.
 java.lang.String getProxyUserId()
          Gets the user authentication proxy.
 int getReceiveBuffer()
          Gets the receive buffer size.
 int getSendBuffer()
          Gets the send buffer size.
 long getSoTimeout()
          Returns reading timeout in milliseconds.
 java.lang.Boolean getTcpNoDelay()
          Get TCP no delay.
 java.lang.Integer getTrafficClass()
          Get socket traffic class.
 void setConnectionTimeout(long value)
          Sets connection timeout.
 void setHost(java.lang.String value)
          Sets host.
 void setMaxIncomingWindowSize(long size)
          Set maximum incoming window size.
 void setMinIncomingWindowSize(long size)
          Set minimum incoming window size.
 void setPort(int value)
          Sets port.
 void setProxyHost(java.lang.String value)
          Sets the proxy hostname.
 void setProxyPassword(java.lang.String value)
          Sets the proxy authentication password.
 void setProxyPort(int value)
          Sets the proxy port.
 void setProxyType(java.lang.String value)
          Sets the proxy type
 void setProxyUserId(java.lang.String value)
          Sets user authentication proxy.
 void setReceiveBuffer(int value)
          Sets the receive buffer size.
 void setSendBuffer(int value)
          Sets the send buffer size.
 void setSoTimeout(long value)
          Sets reading timeout.
 void setTcpNoDelay(java.lang.Boolean value)
          Set TCP no delay.
 void setTrafficClass(java.lang.Integer value)
          Set traffic class.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INFINITE_TIMEOUT

public static final long INFINITE_TIMEOUT
Infinite timeout value.

See Also:
Constant Field Values
Constructor Detail

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            long connectionTimeout,
                            long soTimeout,
                            int sendBuffer,
                            int receiveBuffer,
                            java.lang.Integer trafficClass,
                            java.lang.Boolean tcpNoDelay,
                            java.lang.String proxyHost,
                            int proxyPort,
                            java.lang.String proxyUserId,
                            java.lang.String proxyPassword,
                            java.lang.String proxyType,
                            long minIncomingWindowSize,
                            long maxIncomingWindowSize)

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            long connectionTimeout,
                            long soTimeout,
                            int sendBuffer,
                            int receiveBuffer,
                            java.lang.Integer trafficClass,
                            java.lang.Boolean tcpNoDelay,
                            java.lang.String proxyHost,
                            int proxyPort,
                            java.lang.String proxyUserId,
                            java.lang.String proxyPassword,
                            java.lang.String proxyType)

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            long timeout,
                            java.lang.String proxyHost,
                            int proxyPort,
                            java.lang.String proxyUserId,
                            java.lang.String proxyPassword,
                            java.lang.String proxyType)

ConnectionParameters

public ConnectionParameters(ConnectionParameters that)
Copy constructor.

Parameters:
that - instance to copy

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            long connectionTimeout,
                            long soTimeout,
                            int sendBuffer,
                            int receiveBuffer,
                            java.lang.String proxyHost,
                            int proxyPort,
                            java.lang.String proxyUserId,
                            java.lang.String proxyPassword,
                            java.lang.String proxyType)

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            long timeout,
                            int sendBuffer,
                            int receiveBuffer)
Creates a new parameters instance.

Parameters:
host - the server host
port - the server port
timeout - the connection timeout
sendBuffer - the send buffer size.
receiveBuffer - the receive buffer size.

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            long timeout)
Creates a new parameters instance.

Parameters:
host - the server host
port - the server port
timeout - the connection timeout

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port)
Creates a new parameters instance.

Parameters:
host - host
port - port

ConnectionParameters

public ConnectionParameters(java.lang.String host,
                            int port,
                            int sendBuffer,
                            int receiveBuffer)
Creates a new parameters instance.

Parameters:
host - host
port - port
sendBuffer - send buffer size.
receiveBuffer - receive buffer size.
Method Detail

setMinIncomingWindowSize

public void setMinIncomingWindowSize(long size)
Set minimum incoming window size.

Parameters:
size -

getMinIncomingWindowSize

public long getMinIncomingWindowSize()
Get minimum incoming window size.

Returns:
size

setMaxIncomingWindowSize

public void setMaxIncomingWindowSize(long size)
Set maximum incoming window size.

Parameters:
size -

getMaxIncomingWindowSize

public long getMaxIncomingWindowSize()
Get maximum incoming window size.

Returns:
size

getHost

public java.lang.String getHost()
Obtains target SSH host name.

Returns:
target SSH host name

setHost

public void setHost(java.lang.String value)
Sets host.

Parameters:
value - host

getPort

public int getPort()
Obtains target SSH port.

Returns:
target SSH port

setPort

public void setPort(int value)
Sets port.

Parameters:
value - port

getConnectionTimeout

public long getConnectionTimeout()
Obtains connection timeout value.

Returns:
connection timeout

setConnectionTimeout

public void setConnectionTimeout(long value)
Sets connection timeout.

Parameters:
value - connection timeout

getTrafficClass

public java.lang.Integer getTrafficClass()
Get socket traffic class.

Returns:
traffic class

setTrafficClass

public void setTrafficClass(java.lang.Integer value)
Set traffic class.

Parameters:
value -

getSoTimeout

public long getSoTimeout()
Returns reading timeout in milliseconds.

Returns:
reading timeout in milliseconds

setSoTimeout

public void setSoTimeout(long value)
Sets reading timeout.

Parameters:
value - reading timeout in milliseconds

getTcpNoDelay

public java.lang.Boolean getTcpNoDelay()
Get TCP no delay.

Returns:
TCP no delay

setTcpNoDelay

public void setTcpNoDelay(java.lang.Boolean value)
Set TCP no delay.

Parameters:
value -

getSendBuffer

public int getSendBuffer()
Gets the send buffer size.

Returns:
send buffer size

setSendBuffer

public void setSendBuffer(int value)
Sets the send buffer size.

Parameters:
value - the buffer size.

getReceiveBuffer

public int getReceiveBuffer()
Gets the receive buffer size.

Returns:
receive buffer size

setReceiveBuffer

public void setReceiveBuffer(int value)
Sets the receive buffer size.

Parameters:
value - the buffer size.

getProxyHost

public java.lang.String getProxyHost()
Gets proxy hostname.

Returns:
The proxy hostname

setProxyHost

public void setProxyHost(java.lang.String value)
Sets the proxy hostname.

Parameters:
value - The proxy hostname

getProxyPort

public int getProxyPort()
Gets the proxy port.

Returns:
The proxy port.

setProxyPort

public void setProxyPort(int value)
Sets the proxy port.

Parameters:
value - The proxy port.

getProxyUserId

public java.lang.String getProxyUserId()
Gets the user authentication proxy.

Returns:
User authentication proxy.

setProxyUserId

public void setProxyUserId(java.lang.String value)
Sets user authentication proxy.

Parameters:
value - User authentication proxy.

getProxyPassword

public java.lang.String getProxyPassword()
Gets the proxy authentication password.

Returns:
Proxy authentication password.

setProxyPassword

public void setProxyPassword(java.lang.String value)
Sets the proxy authentication password.

Parameters:
value - Initializes the proxy authentication password.

getProxyType

public java.lang.String getProxyType()
Gets the proxy type: SOCKS5, HTTP.

Returns:
The proxy type

setProxyType

public void setProxyType(java.lang.String value)
Sets the proxy type

Parameters:
value - The proxy type.

createSocket

public java.net.Socket createSocket()
                             throws java.io.IOException
Creates a new connected socket.

Returns:
a new connected socket
Throws:
java.io.IOException - if an I/O error occured

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Secure iNet Factory

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