com.epam.fixengine
Interface FIXMessageFactory


public interface FIXMessageFactory

FIXMessageFactory interface defines object capable to create session level messages. User could extend existing standard MessageFactories or even write his own custom message factory


Method Summary
 FIXFieldList completeMessage(String msgType, FIXFieldList content)
          Completes the message.
 void completeOutgoingFixFields(ExtendedFIXSession fixSession, long preferSeqNum)
          Complete the outgoing fix fields.
 byte[] getCurrentSendingTime()
          Gets current sending time.
 long getEndSequenceNumber()
          Get for current fix version the maximum sequence number.
 FIXFieldList getRejectForMessageTag(FIXFieldList rejectedMessage, FIXField rejectField, int rejectReason, String rejectText)
          Deprecated. 
 FIXFieldList getRejectForMessageTag(FIXFieldList rejectMessage, int refTagId, int rejectReason, String rejectText)
          Creates reject message.
 boolean isSendingTimeWithMs()
          FIX40 and FIX41 use sending time without milliseconds
 void serialize(FIXFieldList content, ChangesType changesType, ByteBuffer buffer, SerializationContext context)
          Build message based on a type and content.
 void serialize(MsgBuf buf, String msgType, FIXFieldList content, ByteBuffer buffer, SerializationContext context)
          Build message based on a type and content.
 void setSessionParameters(SessionParameters sessionParameters)
          Setter for session parameters used to construct message headers.
 

Method Detail

getRejectForMessageTag

@Deprecated
FIXFieldList getRejectForMessageTag(FIXFieldList rejectedMessage,
                                               FIXField rejectField,
                                               int rejectReason,
                                               String rejectText)
Deprecated. 

Since rejects are different for different fix protocol versions we provide this overridable method.

Parameters:
rejectedMessage - the rejected message
rejectField - the rejected field
rejectReason - the rejected reason code
rejectText - the rejected text
Returns:
reject message

getRejectForMessageTag

FIXFieldList getRejectForMessageTag(FIXFieldList rejectMessage,
                                    int refTagId,
                                    int rejectReason,
                                    String rejectText)
Creates reject message.

Parameters:
rejectMessage - the rejected message
refTagId - the reference tag
rejectReason - the reject reason
rejectText - the reject text

setSessionParameters

void setSessionParameters(SessionParameters sessionParameters)
Setter for session parameters used to construct message headers.

Parameters:
sessionParameters - the session parameters

serialize

void serialize(MsgBuf buf,
               String msgType,
               FIXFieldList content,
               ByteBuffer buffer,
               SerializationContext context)
Build message based on a type and content.

Parameters:
msgType - the message type
content - the message content

serialize

void serialize(FIXFieldList content,
               ChangesType changesType,
               ByteBuffer buffer,
               SerializationContext context)
Build message based on a type and content.

Parameters:
content - the message content
changesType - the change type

getEndSequenceNumber

long getEndSequenceNumber()
Get for current fix version the maximum sequence number.

Returns:
sequence number

getCurrentSendingTime

byte[] getCurrentSendingTime()
Gets current sending time.

Returns:
bytes of sending time

isSendingTimeWithMs

boolean isSendingTimeWithMs()
FIX40 and FIX41 use sending time without milliseconds

Returns:
true if sending time with milliseconds

completeMessage

FIXFieldList completeMessage(String msgType,
                             FIXFieldList content)
Completes the message.

Parameters:
msgType - the message type
content - the content of message
Returns:
message

completeOutgoingFixFields

void completeOutgoingFixFields(ExtendedFIXSession fixSession,
                               long preferSeqNum)
Complete the outgoing fix fields.

Method works under the parameter ForceSeqNumReset of session.



Copyright © 2000-2014 EPAM Systems. All Rights Reserved.