it.list.jft
Interface ConnectionParam

All Superinterfaces:
Param

public interface ConnectionParam
extends Param

Connection parameter container.

This container of connection parameters is created by Context.makeConnectionParam() and it is used by Context.makeConnection().

See Also:
Connection Usage, Acceptable Values

Field Summary
static int CONN_TYPE_HTTP_TUNNEL
          Connection-transport type-code: to use an HTTP tunnel, over TCP/IP, as transport.
static int CONN_TYPE_SOCKS4A
          Connection-transport type-code: to use an Socks4A proxy.
static int CONN_TYPE_SOCKS5
          Connection-transport type-code: to use an Socks5 proxy.
static int CONN_TYPE_TCP
          Connection-transport type-code: to use TCP/IP as transport.
static int USER_TYPE_AUTOTRADER
          User-type code: to create a connection on which send data variations (transaction).
static int USER_TYPE_CONTROLLER
          User-type code: to create a specialized (no more here described) connection.
static int USER_TYPE_MASTERSLAVE
          User-type code: to create a specialized (no more here described) connection.
static int USER_TYPE_MONITOR
          User-type code: to create a connection on which request data (subscriptions and/or queries).
static int USER_TYPE_TRADER
          User-type code: to create a connection on which send data variations (transaction).
static int USER_TYPE_VIEW
          User-type code: to create a connection on which request data (subscriptions and queries).
 
Method Summary
 String getAlternativeHost()
          Returns the optional alternative requested server-host of a new connection.
 int getAlternativePort()
          Returns the optional alternative requested server-port of a new connection.
 int[] getApplRevision()
          Returns the client version for the new connection.
 int getApplSignature()
          Returns the client signature for the new connection.
 File getAuthFile()
          Returns the File that contains an authorization key for the new connection.
 String getAuthKey()
          Returns the authorization key for the new connection.
 String getCharSet()
          Returns the String that represents the charset used to code/decode the strings on the new connection.
 int getClientID()
          Returns the ClientID for the new connection.
 boolean getCompression()
          Returns the requested indication about a compressed transmission for a new connection.
 int[] getConnType()
          Returns the array of connection-transport code of a new connection.
 String getHost()
          Returns the requested server-host of a new connection.
 String getPassword()
          Returns the requested user-password of a new connection.
 int getPort()
          Returns the requested server-port of a new connection.
 String getProxyHost()
          Returns the optional requested proxy-host of a new connection.
 int getProxyPort()
          Returns the optional requested proxy-port of a new connection.
 String getProxyUserName()
          Returns the optional requested proxy-username of a new connection.
 String getService()
          Returns the optional market/service name to which the new connection must talk.
 boolean getTcpNoDelay()
          Tests if TCP_NODELAY is enabled.
 String getUserName()
          Returns the requested user-name of a new connection.
 int getUserType()
          Returns the user-type code of a new connection.
 void setAlternativeHost(String alternativeHost)
          Set/replace the optional alternative requested server-host of a new connection.
 void setAlternativePort(int alternativePort)
          Set/replace the optional alternative requested server-port of a new connection.
 void setApplRevision(int[] applRevision)
          Set/replace the client version for the new connection.
 void setApplSignature(int applSignature)
          Set/replace the client signature for the new connection.
 void setAuthFile(File file)
          Set/replace the File that contains an authorization key for the new connection.
 void setAuthKey(String key)
          Set/replace the authorization key for the new connection.
 void setCharSet(String charSet)
          Set/replace the String that represents the charset used to code/decode the strings on the new connection.
 void setClientID(int clientID)
          Set/replace the ClientID for the new connection.
 void setCompression(boolean enable)
          Set/replace the requested indication about a compressed transmission for a new connection.
 void setConnType(int connType)
          Set/replace the connection-transport code of a new connection.
 void setConnType(int[] connType)
          Set/replace the array of connection-transport code to try for a new connection.
 void setHost(String host)
          Set/replace the requested server-host of a new connection.
 void setPassword(String password)
          Set/replace the requested user-password of a new connection.
 void setPort(int port)
          Set/replace the requested server-port of a new connection.
 void setProxyHost(String proxyHost)
          Set/replace the optional requested proxy-host of a new connection.
 void setProxyPassword(String proxyPassword)
          Set/replace the optional requested proxy-password of a new connection.
 void setProxyPort(int proxyPort)
          Set/replace the optional requested proxy-port of a new connection.
 void setProxyUserName(String proxyUserName)
          Set/replace the optional requested proxy-username of a new connection.
 void setService(String service)
          Set/replace the optional market/service name to which the new connection must talk.
 void setTcpNoDelay(boolean noDelay)
          Set the TCP_NODELAY setting.
 void setUserName(String userName)
          Set/replace the requested user-name of a new connection.
 void setUserType(int userType)
          Set/replace the user-type code of a new connection.
 
Methods inherited from interface Param
isBound
 

Field Detail

USER_TYPE_TRADER

static final int USER_TYPE_TRADER
User-type code: to create a connection on which send data variations (transaction).

This value may be set with setUserType(int) and retrieved by getUserType().

This and USER_TYPE_VIEW values are the most commonly used values.

See Also:
Constant Field Values

USER_TYPE_AUTOTRADER

static final int USER_TYPE_AUTOTRADER
User-type code: to create a connection on which send data variations (transaction).

This value may be set with setUserType(int) and retrieved by getUserType().

USER_TYPE_TRADER and USER_TYPE_VIEW values are the most commonly used values.

See Also:
Constant Field Values

USER_TYPE_MONITOR

static final int USER_TYPE_MONITOR
User-type code: to create a connection on which request data (subscriptions and/or queries).

This value may be set with setUserType(int) and retrieved by getUserType().

USER_TYPE_TRADER and USER_TYPE_VIEW values are the most commonly used values.

See Also:
Constant Field Values

USER_TYPE_VIEW

static final int USER_TYPE_VIEW
User-type code: to create a connection on which request data (subscriptions and queries).

This value may be set with setUserType(int) and retrieved by getUserType().

This and USER_TYPE_TRADER values are the most commonly used values.

See Also:
Constant Field Values

USER_TYPE_CONTROLLER

static final int USER_TYPE_CONTROLLER
User-type code: to create a specialized (no more here described) connection.

This value may be set with setUserType(int) and retrieved by getUserType().

USER_TYPE_TRADER and USER_TYPE_VIEW values are the most commonly used values.

See Also:
Constant Field Values

USER_TYPE_MASTERSLAVE

static final int USER_TYPE_MASTERSLAVE
User-type code: to create a specialized (no more here described) connection.

This value may be set with setUserType(int) and retrieved by getUserType().

USER_TYPE_TRADER and USER_TYPE_VIEW values are the most commonly used values.

See Also:
Constant Field Values

CONN_TYPE_TCP

static final int CONN_TYPE_TCP
Connection-transport type-code: to use TCP/IP as transport.

This value may be set with setConnType(int) and retrieved by getConnType().

See Also:
Constant Field Values

CONN_TYPE_HTTP_TUNNEL

static final int CONN_TYPE_HTTP_TUNNEL
Connection-transport type-code: to use an HTTP tunnel, over TCP/IP, as transport.

This value may be set with setConnType(int) and retrieved by getConnType().

See Also:
Constant Field Values

CONN_TYPE_SOCKS4A

static final int CONN_TYPE_SOCKS4A
Connection-transport type-code: to use an Socks4A proxy.

This value may be set with setConnType(int) and retrieved by getConnType().

See Also:
Constant Field Values

CONN_TYPE_SOCKS5

static final int CONN_TYPE_SOCKS5
Connection-transport type-code: to use an Socks5 proxy.

This value may be set with setConnType(int) and retrieved by getConnType().

See Also:
Constant Field Values
Method Detail

getHost

String getHost()
Returns the requested server-host of a new connection.

The pair given by this value together with getPort() describe the server to which the client must talk.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getHost() != null && getHost().length > 0

Returns:
the requested server-host of a new connection.
See Also:
who sets this value, if you want to use YAS service to find the less loaded service

getPort

int getPort()
Returns the requested server-port of a new connection.

The pair given by getHost() together with this value describe the server to which the client must talk.

Used by:
Connection.open()
Default value:
0
Acceptable values:
getPort() > 0

Returns:
the requested server-port of a new connection.
See Also:
who sets this value

getAlternativeHost

String getAlternativeHost()
Returns the optional alternative requested server-host of a new connection.

The optional pair given by this value together with getAlternativePort() describe another server to which the client must talk in the case the first attempt to the principal server (pair getHost() together with getPort()) failed.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getAlternativeHost() == null
|| getAlternativeHost().length > 0 && getAlternativePort() > 0

Returns:
the optional alternative requested server-host of a new connection.
See Also:
who sets this value

getAlternativePort

int getAlternativePort()
Returns the optional alternative requested server-port of a new connection.

The optional pair given by getAlternativeHost() together with this value describe another server to which the client must talk in the case the first attempt to the principal server (pair getHost() together with getPort()) failed.

Used by:
Connection.open()
Default value:
0
Acceptable values:
getAlternativePort == 0
|| getAlternativePort() > 0 && getAlternativeHost() != null && getAlternativeHost().length > 0

Returns:
the optional alternative requested server-port of a new connection.
See Also:
who sets this value

getConnType

int[] getConnType()
Returns the array of connection-transport code of a new connection.

The connection-transport code of a connection describe the transport used on that connection. Possible values are:

In the two latter cases a pair getProxyHost() together with getProxyPort() must be defined.

Used by:
Connection.open()
Default value:
CONN_TYPE_TCP
Acceptable values:
   getConnType() == CONN_TYPE_TCP
|| getConnType() == CONN_TYPE_HTTP_TUNNEL
|| getConnType() == CONN_TYPE_SOCKS4A
|| getConnType() == CONN_TYPE_SOCKS5

Returns:
the array of connection-transport code of a new connection.
See Also:
who sets this value

getProxyHost

String getProxyHost()
Returns the optional requested proxy-host of a new connection.

The optional pair given by this value together with getProxyPort() describe the proxy used when a non-CONN_TYPE_TCP connection-transport is used.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getProxyHost() == null
|| getConnType() != CONN_TYPE_TCP && getProxyHost().length > 0 && getProxyPort() > 0

Returns:
the optional requested proxy-host of a new connection.
See Also:
who sets this value

getProxyPort

int getProxyPort()
Returns the optional requested proxy-port of a new connection.

The optional pair given by getProxyHost() together with this value describe the proxy used when a non-CONN_TYPE_TCP connection-transport is used.

Used by:
Connection.open()
Default value:
0
Acceptable values:
getProxyPort == 0
|| getConnType() != CONN_TYPE_TCP && getProxyPort() > 0 && getProxyHost() != null && getProxyHost().length > 0

Returns:
the requested optional proxy-port of a new connection.
See Also:
who sets this value

getProxyUserName

String getProxyUserName()
Returns the optional requested proxy-username of a new connection.
Used by:
Connection.open()
Default value:
0
Acceptable values:
getProxyPort == 0
|| getConnType() != CONN_TYPE_TCP && getProxyPort() > 0 && getProxyHost() != null && getProxyHost().length > 0

Returns:
the requested optional proxy-username of a new connection.
See Also:
who sets this value, who sets proxy-password

getCompression

boolean getCompression()
Returns the requested indication about a compressed transmission for a new connection.

A true values indicates that the transmission between the client and the server for this connection must be compressed to save bandwidth.

Used by:
Connection.open()
Default value:
false
Acceptable values:
true // any value

Returns:
the requested indication about a compressed transmission for a new connection.
See Also:
who sets this value

getCharSet

String getCharSet()
Returns the String that represents the charset used to code/decode the strings on the new connection.

Every time a String goes from the client to server it's coded as a bytes-sequence using the given charset. The behavior of this transformation when the string cannot be encoded in the given charset is unspecified.

Every time a bytes-sequence goes from the server to the client it's decoded into a String using the given charset. The behavior of this transformation when the given bytes are not valid in the given charset is unspecified.

Please note that the default-value is determined at run-time as "ISO-8859-15" or else "ISO-8859-1" depending on the Java platform on which the clients run:

  • "ISO-8859-15" (ISO-LATIN-9) is the first-choice (because it contains the EURO-sign),
  • "ISO-8859-1" (ISO-LATIN-1) is the second choice (it does not contain the EURO-sign, but it contains the "broken-bar", cedilla, acute-accent, "1/4", "1/2" and "3/4" characters).

Please see ISO Latin 9 as compared with ISO Latin 1 to check all differences between the two charsets.

Used by:
Connection.open()
Default value:
"ISO-8859-15" ISO-LATIN-9, if supported by the Java platform on which the client runs,
"ISO-8859-1" ISO-LATIN-1, otherwise.
Acceptable values:
getCharSet() != null && getCharSet().length > 0
&& new String("Hello World").getBytes(getCharSet()) != null // i.e. no exception thrown

Returns:
the String that represents the Charset used to code/decode the strings on the new connection.
See Also:
who sets this value

getService

String getService()
Returns the optional market/service name to which the new connection must talk.
Used by:
Connection.open()
Default value:
null
Acceptable values:
getService() == null || getService.length > 0

Returns:
the optional market/service name to which the new connection must talk.
See Also:
who sets this value

getUserType

int getUserType()
Returns the user-type code of a new connection.

The user-type code of a connection describe the activities that can be made on that connection. Possible values are:

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_USERTYPE failure-code if it does not comply with this value.

Used by:
Connection.open()
Default value:
USER_TYPE_VIEW
Acceptable values:
   getUserType() == USER_TYPE_TRADER
|| getUserType() == USER_TYPE_AUTOTRADER
|| getUserType() == USER_TYPE_MONITOR
|| getUserType() == USER_TYPE_VIEW
|| getUserType() == USER_TYPE_CONTROLLER
|| getUserType() == USER_TYPE_MASTERSLAVE

Returns:
the user-type code of a new connection.
See Also:
who sets this value

getUserName

String getUserName()
Returns the requested user-name of a new connection.

The pair given by this value together with getPassword() describe the user associated to the new connection.

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_USERNAME failure-code if it does not comply with this value.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getUserName() != null && getUserName().length > 0

Returns:
the requested user-name of a new connection.
See Also:
who sets this value

getPassword

String getPassword()
Returns the requested user-password of a new connection.

The pair given by getUserName() together with this value describe the user associated to the new connection.

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_PASSWORD failure-code if it does not comply with this value.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getPassword() != null && getPassword().length > 0

Returns:
the requested user-password of a new connection.
See Also:
who sets this value

getClientID

int getClientID()
Returns the ClientID for the new connection.

The ClientID is a positive number that uniquely identifies the client.

This number is automatically used on TransactionIDs of all Transactions sent on this connection.

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_CLIENTID failure-code if it does not comply with this value.

Used by:
Connection.open()
Default value:
0
Acceptable values:
getClientID() > 0

Returns:
the ClientID for the new connection.
See Also:
who sets this value

getApplRevision

int[] getApplRevision()
Returns the client version for the new connection.

A version is always represented by a three-dimensional array; e.g. the version 2.0.3 is represented by:
int[] version = {2, 0, 3};

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_REVISION failure-code if it does not comply with this value.

Used by:
Connection.open()
Default value:
{0,0,0}
Acceptable values:
getApplRevision() != null && getApplRevision().length == 3
&& getApplRevision()[0] >= 0 && getApplRevision()[0] <= 255
&& getApplRevision()[1] >= 0 && getApplRevision()[1] <= 255
&& getApplRevision()[2] >= 0 && getApplRevision()[2] <= 255

Returns:
the client version for the new connection.
See Also:
who sets this value

getApplSignature

int getApplSignature()
Returns the client signature for the new connection.

A signature is a non-negative number, that may be be required by the service (on the server) that manages the market.

Used by:
Connection.open()
Default value:
0
Acceptable values:
getApplSignature() >= 0

Returns:
the client signature for the new connection.
See Also:
who sets this value

getAuthKey

String getAuthKey()
Returns the authorization key for the new connection.

An authorization key (normally given by List S.p.a. in an authorization file is a key that allow the client to open and use successfully a connection with a given server.

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_AUTH_KEY failure-code if it does not comply with this value.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getAuthKey == null
|| getAuthFile() == null && getAuthKey().length > 0

Returns:
the authorization key for the new connection.
See Also:
who sets this value

getAuthFile

File getAuthFile()
Returns the File that contains an authorization key for the new connection.

An authorization file, given by List S.p.a., contains a key that allow the client to open and use successfully a connection with a given server.

The server may subsequently returns a ConnectionOpenEvent.RESULT_INVALID_AUTH_KEY failure-code if it does not comply with the authorization key.

Used by:
Connection.open()
Default value:
null
Acceptable values:
getAuthFile() == null
|| getAuthKey() == null && getAuthFile().canRead()

Returns:
the File that contains an authorization key for the new connection.
See Also:
who sets this value

getTcpNoDelay

boolean getTcpNoDelay()
Tests if TCP_NODELAY is enabled.

A true values indicates that Nagle's algorithm is disabled.

Used by:
Connection.open()
Default value:
true
Acceptable values:
true // any value

Returns:
a boolean indicating whether or not TCP_NODELAY is enabled.
See Also:
who sets this value

setHost

void setHost(String host)
             throws IllegalStateException
Set/replace the requested server-host of a new connection.

Parameters:
host - the requested server-host of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setPort

void setPort(int port)
             throws IllegalStateException
Set/replace the requested server-port of a new connection.

Parameters:
port - the requested server-port of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setAlternativeHost

void setAlternativeHost(String alternativeHost)
                        throws IllegalStateException
Set/replace the optional alternative requested server-host of a new connection.

Parameters:
alternativeHost - the optional alternative requested server-host of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setAlternativePort

void setAlternativePort(int alternativePort)
                        throws IllegalStateException
Set/replace the optional alternative requested server-port of a new connection.

Parameters:
alternativePort - the optional alternative requested server-port of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setConnType

void setConnType(int connType)
                 throws IllegalStateException
Set/replace the connection-transport code of a new connection.

Parameters:
connType - the connection-transport code of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setConnType

void setConnType(int[] connType)
                 throws IllegalStateException
Set/replace the array of connection-transport code to try for a new connection.

Parameters:
connType - array of the connection-transport code of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setProxyHost

void setProxyHost(String proxyHost)
                  throws IllegalStateException
Set/replace the optional requested proxy-host of a new connection.

Parameters:
proxyHost - the optional requested proxy-host of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setProxyPort

void setProxyPort(int proxyPort)
                  throws IllegalStateException
Set/replace the optional requested proxy-port of a new connection.

Parameters:
proxyPort - the optional requested proxy-port of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setProxyUserName

void setProxyUserName(String proxyUserName)
Set/replace the optional requested proxy-username of a new connection.

Parameters:
proxyUserName - the optional requested proxy-username of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setProxyPassword

void setProxyPassword(String proxyPassword)
Set/replace the optional requested proxy-password of a new connection.

Parameters:
proxyPassword - the optional requested proxy-password of a new connection.
Throws:
IllegalStateException - if this container is already bound.

setCompression

void setCompression(boolean enable)
                    throws IllegalStateException
Set/replace the requested indication about a compressed transmission for a new connection.

Parameters:
enable - the requested indication about a compressed transmission for a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setCharSet

void setCharSet(String charSet)
                throws IllegalStateException
Set/replace the String that represents the charset used to code/decode the strings on the new connection.

Parameters:
charSet - the String that represents the charset used to code/decode the strings on the new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setService

void setService(String service)
                throws IllegalStateException
Set/replace the optional market/service name to which the new connection must talk.

If you set the service, you ask to YAS service (identified by host and port parameters) to establish a connection with the less-loaded service.

You can specifies the double services connection required by ASIA platform using "|" (pipe) character as the separator of the public and private service name, for example: "PUBLMETAMARKET|PRIVMETAMARKET"

Parameters:
service - the optional market/service name to which the new connection must talk.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setUserType

void setUserType(int userType)
                 throws IllegalStateException
Set/replace the user-type code of a new connection.

Parameters:
userType - the user-type code of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setUserName

void setUserName(String userName)
                 throws IllegalStateException
Set/replace the requested user-name of a new connection.

Parameters:
userName - the requested user-name of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setPassword

void setPassword(String password)
                 throws IllegalStateException
Set/replace the requested user-password of a new connection.

Parameters:
password - the requested user-password of a new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setClientID

void setClientID(int clientID)
                 throws IllegalStateException
Set/replace the ClientID for the new connection.

Parameters:
clientID - the ClientID for the new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setApplRevision

void setApplRevision(int[] applRevision)
                     throws IllegalStateException
Set/replace the client version for the new connection.

Parameters:
applRevision - the client version for the new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setApplSignature

void setApplSignature(int applSignature)
                      throws IllegalStateException
Set/replace the client signature for the new connection.

Parameters:
applSignature - the client signature for the new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setAuthKey

void setAuthKey(String key)
                throws IllegalStateException
Set/replace the authorization key for the new connection.

Parameters:
key - the authorization key for the new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setAuthFile

void setAuthFile(File file)
                 throws IllegalStateException
Set/replace the File that contains an authorization key for the new connection.

Parameters:
file - the File that contains an authorization key for the new connection.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning

setTcpNoDelay

void setTcpNoDelay(boolean noDelay)
                   throws IllegalStateException
Set the TCP_NODELAY setting. Setting this to true will disable Nagle's algorithm for TCP. The default is true.

Parameters:
noDelay - false to disable TCP_NODELAY (enable Nagle's algorithm), true to enable.
Throws:
IllegalStateException - if this container is already bound.
See Also:
default/current/acceptable values and their meaning


Submit a bug or feature to FT\API Programming Support<\font>