|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IUserSession
Interface class that defines support of user session entity with predefined
fields and behavior.
| Field Summary | |
|---|---|
static String |
PIN
|
| Method Summary | |
|---|---|
void |
attach(String aSessionID,
String aExtraParams)
Attaches to an existing trading session. |
void |
close()
Performs session logout and closes communication channels. |
void |
force()
Forces immediate message retrieval on particular instance of User Session ignoring scheduled retrieval interval defined by setInterval() method. |
ISessionStatus |
getCurrentStatus()
Obtains current Sesson Status |
String |
getHostParamValue(String aAttributeName)
Obtains requested attribute value by attribute name from default host descriptor. |
IMessageFactory |
getMessageFactory()
Obtains instance of message factory |
String |
getNextRequestID()
Obtains new unque sequence number withing the session. |
Object |
getParameter(String aName)
Retrieve the specified parameter value, null if empty. |
int |
getQueueSize()
Obtains session message queue size |
String |
getSessionID()
Returns session ID unique string |
String |
getStationParamValue(String aAttributeName)
Obtains requested attribute value from station element from default host descriptor. |
TradingSessionDesc |
getTradingSession()
Obtains descriptor if current Trading Session. |
int |
getUserID()
Obtains unique id of user |
int |
getUserKind()
Obtains code of user type |
boolean |
isClosed()
Checks if session is closed |
boolean |
isValid()
Checks if session is still valid |
boolean |
loadStationDescriptor()
Loads station descriptor from server. |
boolean |
open()
Performs session login and opens all communication channels. |
boolean |
open(String aExtraParams)
Performs session login and opens all communication channels. |
void |
removeMessageListener(IUserMessageListener aListener)
Un-Register IUserMessageListener from the session. |
void |
removeMessageListener(IUserTransportableListener aListener)
Un-Register IUserMessageListener from the session. |
void |
removeSessionStatusListener(IUserSessionStatusListener aListener)
Un-Register IUserSessionStatusListener from the session. |
TradingSessionDesc[] |
retrieveTradingSessions()
Obtains list of trading session that is available to login. |
String |
send(IMessage aMessage)
Sends posts/sends an IMessage to a server to be delivered to all interested parties. |
boolean |
setMessageListener(IUserMessageListener aListener)
Register IUserMessageListener within the session. |
boolean |
setMessageListener(IUserTransportableListener aListener)
Register IUserMessageListener within the session. |
void |
setMsgFlags(long aMsgFlags)
Sets the message flags |
void |
setParameter(String aName,
String aValue)
Set a extra Parameter |
boolean |
setSessionStatusListener(IUserSessionStatusListener aListener)
Register IUserSessionStatusListener within the session. |
void |
setTradingSession(TradingSessionDesc aTradingSession)
Sets trading session |
| Field Detail |
|---|
static final String PIN
| Method Detail |
|---|
void attach(String aSessionID,
String aExtraParams)
throws com.fxcm.GenericException
aSessionID - Identifier of session to attach to. The session should be logged in already.aExtraParams - extra parameters
com.fxcm.GenericException - in case of any error
void close()
throws com.fxcm.GenericException
com.fxcm.GenericException - in case of any errorvoid force()
setInterval() method.
This method has effect when UserSession
uses "pull" base protocol (HTTP) as underline communication protocol.
update() of
registered IUserMessageListener within current session context.
ISessionStatus getCurrentStatus()
null if session is not validString getHostParamValue(String aAttributeName)
aAttributeName - name of attribute.
IMessageFactory getMessageFactory()
String getNextRequestID()
throws com.fxcm.GenericException
com.fxcm.GenericExceptionObject getParameter(String aName)
aName - int getQueueSize()
0 if session is not validString getSessionID()
String getStationParamValue(String aAttributeName)
aAttributeName - name of station attribute.
TradingSessionDesc getTradingSession()
int getUserID()
int getUserKind()
boolean isClosed()
true is session is closed; false otherwiseboolean isValid()
true in case of active session; false otherwise
boolean loadStationDescriptor()
throws com.fxcm.GenericException
true in case of success; false otherwise
com.fxcm.GenericException
boolean open()
throws com.fxcm.GenericException
true in case of success, false otherwise
com.fxcm.GenericException - in case of any error
boolean open(String aExtraParams)
throws com.fxcm.GenericException
true in case of success, false otherwise
com.fxcm.GenericException - in case of any errorvoid removeMessageListener(IUserMessageListener aListener)
aListener - message listener to deassignvoid removeMessageListener(IUserTransportableListener aListener)
aListener - message listener to deassignvoid removeSessionStatusListener(IUserSessionStatusListener aListener)
aListener - status listener to remove
TradingSessionDesc[] retrieveTradingSessions()
throws com.fxcm.GenericException
com.fxcm.GenericException - in case of any error
String send(IMessage aMessage)
throws com.fxcm.GenericException
aMessage - message to send, correct user session ID will be overwritten with current one
com.fxcm.GenericException - is thrown in case of any errorboolean setMessageListener(IUserMessageListener aListener)
aListener - message listener to assign
true in case of sccess; false otherwiseboolean setMessageListener(IUserTransportableListener aListener)
aListener - message listener to assign
true in case of sccess; false otherwisevoid setMsgFlags(long aMsgFlags)
aMsgFlags - See IFixDefs.CHANNEL_* for possible values.
void setParameter(String aName,
String aValue)
aName - aValue - boolean setSessionStatusListener(IUserSessionStatusListener aListener)
aListener - status listener to assign
true in case of success; flase otherwisevoid setTradingSession(TradingSessionDesc aTradingSession)
aTradingSession - Trading Session Descripor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||