Class MessageSchema

java.lang.Object
uk.co.real_logic.sbe.xml.MessageSchema

public class MessageSchema extends Object
Message schema aggregate for schema attributes, messageHeader, and reference for multiple Message objects.
  • Field Details

    • HEADER_TYPE_DEFAULT

      public static final String HEADER_TYPE_DEFAULT
      Default message header type name for the SBE spec.
      See Also:
  • Method Details

    • messageHeader

      public CompositeType messageHeader()
      The Schema headerType for message headers. This should be a CompositeType.
      Returns:
      the Schema headerType for message headers
    • packageName

      public String packageName()
      The package name for the schema.
      Returns:
      he package name for the schema.
    • description

      public String description()
      The description of the schema.
      Returns:
      the description of the schema.
    • id

      public int id()
      The id number of the schema.
      Returns:
      the id number of the schema.
    • version

      public int version()
      The version number of the schema.
      Returns:
      the version number of the schema.
    • semanticVersion

      public String semanticVersion()
      The semantic version number of the schema. Typically, used to reference a third party standard such as FIX.
      Returns:
      the semantic version number of the schema.
    • getMessage

      public Message getMessage(long messageId)
      Return a given Message object with the given messageId.
      Parameters:
      messageId - of the message to return.
      Returns:
      a given Message for the messageId.
    • getType

      public Type getType(String typeName)
      Get the Type for a given name.
      Parameters:
      typeName - to lookup.
      Returns:
      the type if found otherwise null.
    • messages

      public Collection<Message> messages()
      Get the Collection of Messages for this Schema.
      Returns:
      the Collection of Messages for this Schema.
    • types

      public Collection<Type> types()
      Get the Collection of Types for this Schema.
      Returns:
      the Collection of Types for this Schema.
    • byteOrder

      public ByteOrder byteOrder()
      Return the byte order specified by the messageSchema
      Returns:
      ByteOrder of the message encoding.
    • validate

      public void validate(ErrorHandler errorHandler)
      Validate the message schema and delegate warnings and errors to the supplied ErrorHandler.
      Parameters:
      errorHandler - for delegating warnings and errors.