|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fxcm.messaging.ConnectionManagerEx
public class ConnectionManagerEx
ConnectionManagerEx class is a client side singleton manager for communication sessions. It supports multiple sessions within the same client side JVM space.
| Constructor Summary | |
|---|---|
ConnectionManagerEx()
|
|
| Method Summary | |
|---|---|
static void |
cleanup()
Cleans up Communication Manager. |
static void |
cleanup(IUserSession aUserSession)
close and remove from session list |
static IUserSession |
createUserSession(String aHostDescriptorURL,
String aHostName,
String aLoginID,
String aPassword,
String aStationName)
Creates a new empty user session with remote service with host descriptior only. |
static IUserSession |
createUserSession(String aHostDescriptorURL,
String aHostName,
String aServiceName,
String aLoginID,
String aPassword,
String aStationName)
Creates a new empty user session with remote service by its name and host descriptior. |
static IUserSession |
createUserSession(String aHostDescriptorURL,
String aHostName,
String aServiceName,
String aLoginID,
String aPassword,
String aStationName,
com.fxcm.messaging.util.IConnectionManager aConnectionManager)
Creates a new empty user session with remote service by its name and host descriptior. |
static IMessageFactory |
getMessageFactory()
Obtains instance of message factory |
static IUserSession |
getUserSession(String aSessionID)
Obtains User Session by its ID |
static Enumeration |
getUserSessions(String aSessionID)
Obtains all User Sessions with the same ID |
static String |
getVersion()
Obtains vesrion number of SDK. |
static void |
init(Properties aProps)
Initializes based on properties bundle. |
static void |
init(String aProperitesFileName)
Initialzes based on the properties file name. |
static void |
setAsync(boolean aFlag)
Specifies whether async mode of TCP/IP. |
static void |
setBasicProxyAuthorization(String aUserID,
String aPassword)
Specifies user id and password to be used by a proxy server for basic authorization. |
static void |
setBatchSize(int aNumberOfMessagesInBatch)
Sets maximum number of messages allowed in one retrieval batch. |
static void |
setDebug(boolean aFlag)
Deprecated. Do not use setDebug anymore. Use commons logging instead. setDebug is EMPTY! |
static void |
setHttpTimeout(int aTimeout)
Specifies timeout fot HTTP based sessions. |
static void |
setInterval(long aMilliSec)
Sets poll interval for automatic data retrieval in milliseconds. |
static void |
setListenAdminMessages(boolean aFlag)
Specifies Message Listener mode. |
static void |
setMsgFlags(long aMsgFlags)
Sets the message flags |
static void |
setNoReconnectAttempts(int aAttempts)
Sets number of attempts to restore a session. |
static void |
setNoReloginAttempts(int aAttempts)
Sets number of attempts to restore a connection / relogin. |
static void |
setProxyAuthenticationRealm(String aProxyAuthenticationRealm)
Sets proxy authentication real |
static void |
setProxyOverHTTP11(boolean aFlag)
Forcing usage of HTTP 1.1 protocol. |
static void |
setProxyServer(String aAddress,
int aPort)
Specifies how to connect to the remote server through a proxy server. |
static void |
setProxyType(String aProxyType)
Sets the type of the proxy being used for the HTTP |
static void |
setReconnectTimeout(int aTimeout)
Sets timeout between attempts of session restoring. |
static void |
setReloginTimeout(int aTimeout)
Sets timeout between attempts of relogin. |
static void |
setSecurePreferable(boolean aFlag)
Specifies whether secure connection is preferable. |
static void |
setTcpTimeout(int aTimeout)
Specifies timeout fot TCP/IP based sessions. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionManagerEx()
| Method Detail |
|---|
public static void init(String aProperitesFileName)
init(Properties) for list of property names.
aProperitesFileName - name of properties filepublic static void init(Properties aProps)
IFixDefs.CHANNEL_* for possible values.
aProps - a properties bundlepublic static String getVersion()
public static void setNoReloginAttempts(int aAttempts)
aAttempts - should be more then 0, deafult 3public static void setReloginTimeout(int aTimeout)
aTimeout - timeout in ms, mininum 3000, deafult 20000public static void setNoReconnectAttempts(int aAttempts)
aAttempts - should be more then 0, deafult 3public static void setReconnectTimeout(int aTimeout)
aTimeout - timeout in ms, mininum 500, deafult 2000public static void setInterval(long aMilliSec)
aMilliSec - new value of polling interval, minimum 2000, default 2000public static void setBatchSize(int aNumberOfMessagesInBatch)
aNumberOfMessagesInBatch - number of messages allowed in one batch, minimum 1, default 20
public static void setProxyServer(String aAddress,
int aPort)
aAddress - an address of the proxy server.aPort - a port of the proxy server.
public static void setBasicProxyAuthorization(String aUserID,
String aPassword)
aUserID - an user id.aPassword - an user password.public static void setProxyAuthenticationRealm(String aProxyAuthenticationRealm)
aProxyAuthenticationRealm - Proxy Autentication Realmpublic static void setProxyType(String aProxyType)
aProxyType - Proxy Typepublic static void setProxyOverHTTP11(boolean aFlag)
aFlag - true enables HTTP 1.1 proxy tunnelingpublic static void setTcpTimeout(int aTimeout)
aTimeout - timeout to setup, more then 0, 0 means default (180000 ms)public static void setHttpTimeout(int aTimeout)
aTimeout - timeout to setup, more then 0, 0 means default (180000 ms)public static void setListenAdminMessages(boolean aFlag)
aFlag - defines whether message listener is able to process admin messages or notpublic static void setSecurePreferable(boolean aFlag)
aFlag - secure flag to setuppublic static void setAsync(boolean aFlag)
aFlag - async flag to setuppublic static void setMsgFlags(long aMsgFlags)
aMsgFlags - See IFixDefs.CHANNEL_* for possible values.public static IMessageFactory getMessageFactory()
public static IUserSession createUserSession(String aHostDescriptorURL,
String aHostName,
String aServiceName,
String aLoginID,
String aPassword,
String aStationName)
aHostDescriptorURL - url of remote configuration (xml) fileaHostName - name of the host defined in server configuration file.aServiceName - name of application service "PriceServer" or "NewsServer"aLoginID - an user idaPassword - an user passwordaStationName - end user station(application) name
public static IUserSession createUserSession(String aHostDescriptorURL,
String aHostName,
String aServiceName,
String aLoginID,
String aPassword,
String aStationName,
com.fxcm.messaging.util.IConnectionManager aConnectionManager)
aHostDescriptorURL - aHostName - aServiceName - aLoginID - aPassword - aStationName - aConnectionManager -
public static IUserSession createUserSession(String aHostDescriptorURL,
String aHostName,
String aLoginID,
String aPassword,
String aStationName)
aServiceName = aHostName
aHostDescriptorURL - url of remote configuration (xml) fileaHostName - name of the host defined in server configuration file.aLoginID - an user idaPassword - an user passwordaStationName - end user station(application) name
public static IUserSession getUserSession(String aSessionID)
aSessionID - session ID
null if session is not foundpublic static Enumeration getUserSessions(String aSessionID)
aSessionID - session ID
public static void cleanup()
public static void cleanup(IUserSession aUserSession)
aUserSession - public static void setDebug(boolean aFlag)
aFlag - debug flag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||