|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FIXSession
This interface is the main interface user works with. It represents FIXSession either acceptor or initiator. And capable to send/receive messages.
Field Summary | |
---|---|
static int |
DEFAULT_SENDING_OPTIONS
|
static int |
SEND_ASYNC
ASYNC - Enqueue the message before sending as opposed to sending immediately from calling thread. |
static int |
SEND_SYNC
FORCE_SYNC - Send the message synchronously. |
Method Summary | |
---|---|
void |
connect()
Connects to remote counterparty, if initiator or accepts incoming connection if acceptor. |
void |
disconnect(String reason)
Gracefully disconnects current session. |
void |
dispose()
Disposes current session, removes its reference from GlobalSessionManager and frees all allocated resources. |
MessageValidator |
getMessageValidator()
Returns message validator. |
SessionParameters |
getSessionParameters()
Returns the cloned session connection parameters instance. |
SessionState |
getSessionState()
Returns session state. |
FIXFieldList |
prepareMessage(FIXFieldList message,
MessageStructure structure)
Builds FIXFieldList object from FIXFieldList object. |
FIXFieldList |
prepareMessage(FIXFieldList message,
String type,
MessageStructure structure)
Builds FIXFieldList object from FIXFieldList object. |
FIXFieldList |
prepareMessage(String msgType,
MessageStructure userStructure)
Builds FIXFieldList object with specified type, message structure and prefilled header information |
FIXFieldList |
prepareMessageFromString(byte[] message,
MessageStructure structure)
Builds FIXFieldList object from String object. |
FIXFieldList |
prepareMessageFromString(byte[] message,
String type,
MessageStructure structure)
Builds FIXFieldList object from String object. |
void |
reject(String reason)
Reject incoming connection for acceptor. |
void |
resetSequenceNumbers()
Allows user to reset sequences numbers by sending logon with 141=Y. |
void |
resetSequenceNumbers(boolean checkGapFillBefore)
Allows user to reset sequences numbers by sending logon with 141=Y. |
boolean |
sendAsIs(FIXFieldList message)
Convenient method to send out FIX message based on the message type and message content. |
boolean |
sendAsIs(FIXFieldList message,
int optionMask)
Convenient method to send out FIX message based on the message type and message content. |
boolean |
sendMessage(FIXFieldList message)
Convenient method to send out user built FIX message. |
boolean |
sendMessage(FIXFieldList message,
int optionMask)
Convenient method to send out user built FIX message. |
boolean |
sendMessage(String msgType,
FIXFieldList content)
Convenient method to send out FIX message based on the message type and message content. |
boolean |
sendMessage(String msgType,
FIXFieldList content,
int optionMask)
Convenient method to send out FIX message based on the message type and message content. |
boolean |
sendWithChanges(FIXFieldList content,
ChangesType allowedChangesType)
Convenient method to send out FIX message based on the message type and message content. |
boolean |
sendWithChanges(FIXFieldList content,
ChangesType allowedChangesType,
int optionMask)
Convenient method to send out FIX message based on the message type and message content. |
void |
setErrorHandler(ErrorHandler handler)
Sets error handler. |
void |
setFIXSessionListener(FIXSessionListener listener)
Sets FIXSession listener to monitor session status and receive incoming messages. |
void |
setRejectMessageListener(RejectMessageListener listener)
Sets reject message listener. |
void |
setSequenceNumbers(int inSeqNum,
int outSeqNum)
Allows user to change sequences numbers for disconnected sessions. |
Field Detail |
---|
static final int SEND_ASYNC
static final int SEND_SYNC
static final int DEFAULT_SENDING_OPTIONS
Method Detail |
---|
SessionState getSessionState()
FIXFieldList prepareMessage(FIXFieldList message, MessageStructure structure) throws PreparedMessageException
message
- FIXFieldList objectstructure
- message structure
PreparedMessageException
- exceptionFIXFieldList prepareMessage(FIXFieldList message, String type, MessageStructure structure) throws PreparedMessageException
message
- FIXFieldList objectstructure
- message structuretype
- type of the message
PreparedMessageException
- exceptionFIXFieldList prepareMessage(String msgType, MessageStructure userStructure) throws PreparedMessageException
msgType
- message typeuserStructure
- message structure
PreparedMessageException
FIXFieldList prepareMessageFromString(byte[] message, MessageStructure structure) throws PreparedMessageException
message
- message stringstructure
- message structure object
PreparedMessageException
- exceptionFIXFieldList prepareMessageFromString(byte[] message, String type, MessageStructure structure) throws PreparedMessageException
message
- message stringstructure
- message structure objecttype
- message type
PreparedMessageException
- exceptionvoid resetSequenceNumbers() throws IOException
IOException
void resetSequenceNumbers(boolean checkGapFillBefore) throws IOException
checkGapFillBefore
- - the flag indicates if needed to check the seq num.
If true the TR will be sent before introday logon otherwise only intraday logon will be sent.
IOException
void setSequenceNumbers(int inSeqNum, int outSeqNum) throws IOException
inSeqNum
- new incoming sequence number. If new value is < 0, then this parameter will be ignored.outSeqNum
- new outgoing sequence number. If new value is < 0, then this parameter will be ignored.
IOException
SessionParameters getSessionParameters()
void connect() throws IOException
IOException
- I/O exception if error occurredvoid reject(String reason) throws IOException
IOException
- I/O exception if error occurredvoid disconnect(String reason)
reason
- the reasonboolean sendMessage(String msgType, FIXFieldList content)
msgType
is null, Engine sends the message as is;
msgType
is "", Engine updates body length, sequence number, sending time and checksum fields;
content
.
msgType
- the message type (Tag 35 content)content
- the message content
IllegalStateException
- if session is disposedboolean sendMessage(String msgType, FIXFieldList content, int optionMask)
msgType
is null, Engine sends the message as is;
msgType
is "", Engine updates body length, sequence number, sending time and checksum fields;
content
.
msgType
- the message type (Tag 35 content)content
- the message contentoptionMask
- SEND_SYNC
or SEND_ASYNC
IllegalStateException
- if session is disposedboolean sendMessage(FIXFieldList message)
message
.
message
- the message
IllegalStateException
- if session is disposedboolean sendMessage(FIXFieldList message, int optionMask)
message
.
message
- the messageoptionMask
- SEND_SYNC
or SEND_ASYNC
IllegalStateException
- if session is disposedboolean sendAsIs(FIXFieldList message)
message
- the message content
IllegalStateException
- if session is disposedboolean sendAsIs(FIXFieldList message, int optionMask)
message
- the message contentoptionMask
- SEND_SYNC
or SEND_ASYNC
IllegalStateException
- if session is disposedboolean sendWithChanges(FIXFieldList content, ChangesType allowedChangesType)
content
- the message contentallowedChangesType
- the parameter takes the next values:IllegalStateException
- if session is disposedChangesType
boolean sendWithChanges(FIXFieldList content, ChangesType allowedChangesType, int optionMask)
content
- the message contentallowedChangesType
- the parameter takes the next values:optionMask
- SEND_SYNC
or SEND_ASYNC
IllegalStateException
- if session is disposedChangesType
void dispose()
MessageValidator getMessageValidator()
void setFIXSessionListener(FIXSessionListener listener)
listener
- the user specified listenervoid setErrorHandler(ErrorHandler handler)
handler
- the error handlerErrorHandler
void setRejectMessageListener(RejectMessageListener listener)
listener
- the reject message listenerRejectMessageListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |