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 Details

    • 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
    • setRuntimeState

      void setRuntimeState(FIXSessionRuntimeState runtimeState)
    • 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

      @Deprecated boolean isSendingTimeWithMs()
      Deprecated.
      FIX40 and FIX41 use sending time without milliseconds
      Returns:
      true if sending time with milliseconds
    • getSendingTime

      SendingTime getSendingTime()
      Returns appropriate SendingTime implementation
      Returns:
      SendingTime implementation
    • completeMessage

      FIXFieldList completeMessage(String msgType, FIXFieldList content)
      Completes the message.
      Parameters:
      msgType - the message type
      content - the content of message
      Returns:
      message