public class MessageSchema extends Object implements IMessageSchema
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageSchema.Endianess
Endianess used by the message schema.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
LICENSE_DIRECTORY_DEFAULT |
static String |
LICENSE_FILE_DEFAULT |
| Constructor and Description |
|---|
MessageSchema(Document xmlSchema)
Constructs object by XML template.
|
MessageSchema(Document xmlSchema,
boolean isMdp3)
Construct schema to use with CME specifications.
|
MessageSchema(Document xmlSchema,
FramingHeaderPolicy framingHeaderPolicy)
Constructs object by XML template.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(UnifiedMetaData message) |
void |
buildVirtualFields() |
UnifiedMetaData |
findType(Function<UnifiedMetaData,Boolean> condition) |
String |
getDescription()
Returns schema description of the schema.
|
MessageSchema.Endianess |
getEndianess() |
int |
getFrameHeaderSize()
Returns size of the frame header.
|
FramingHeaderSpecification |
getFramingHeaderSpecification() |
UnifiedMetaData |
getHeaderType()
Returns definition of messages header type.
|
String |
getHeaderTypeName() |
int |
getId()
Returns schema id.
|
static String |
getLicense()
Gets license content.
|
static String |
getLicenseDirectory()
Gets path to the license file directory.
|
LocalDate |
getLicenseExpirationDate()
Gets license expiration date.
|
static String |
getLicenseFile()
Gets path to the license file.
|
Map<Integer,UnifiedMetaData> |
getMessages()
Gets map of all messages in the schema.
|
Map<String,UnifiedMetaData> |
getMessagesByNames() |
String |
getPackage()
Returns schema name.
|
String |
getPackageName() |
UnifiedMetaData |
getResolvedHeaderType() |
String |
getSemanticVersion()
Returns the semantic version of the schema.
|
UnifiedMetaData |
getType(String name)
Gets type from schema dictionary.
|
Map<String,UnifiedMetaData> |
getTypes() |
int |
getVersion()
Returns schema version.
|
boolean |
isLittleEndian()
Returns byte order.
|
boolean |
isMdp3Mode()
Returns CME MDP3 mode.
|
int |
queryVirtualFieldId(String[] fieldPath)
Query virtual field id by the field's path.
|
void |
recognizeTypes() |
void |
resolveHeaders() |
void |
resolveInternalLinks() |
void |
resolveOffsets() |
void |
resolveValues() |
static void |
setLicense(String license)
Sets license content.
|
static void |
setLicenseDirectory(String licenseDirectory)
Sets path to the license file directory.
|
static void |
setLicenseFile(String licenseFile)
Sets path to the license file.
|
void |
validate() |
public static final String LICENSE_DIRECTORY_DEFAULT
public static final String LICENSE_FILE_DEFAULT
public MessageSchema(Document xmlSchema, boolean isMdp3) throws LicenseException
xmlSchema - CME SBE template schema.isMdp3 - true for MDP3 templates, false - for iLink3 templates.LicenseException - if the license not found.public MessageSchema(Document xmlSchema) throws LicenseException
xmlSchema - XML document with SBE template.LicenseException - if valid license not found.public MessageSchema(Document xmlSchema, FramingHeaderPolicy framingHeaderPolicy) throws LicenseException
xmlSchema - XML document with SBE template.framingHeaderPolicy - framing header creating policy.LicenseException - if valid license not found.public static String getLicenseDirectory()
LICENSE_DIRECTORY_DEFAULT directory.public static void setLicenseDirectory(String licenseDirectory)
LICENSE_DIRECTORY_DEFAULT directory.licenseDirectory - path to directory.public static String getLicenseFile()
LICENSE_FILE_DEFAULT.public static void setLicenseFile(String licenseFile)
LICENSE_FILE_DEFAULT.licenseFile - path to file.public static String getLicense()
public static void setLicense(String license)
license - license content.public LocalDate getLicenseExpirationDate()
public String getPackageName()
public int getVersion()
IMessageSchemagetVersion in interface IMessageSchemapublic String getDescription()
IMessageSchemagetDescription in interface IMessageSchemapublic int getFrameHeaderSize()
IMessageSchemagetFrameHeaderSize in interface IMessageSchemapublic boolean isMdp3Mode()
IMessageSchemaisMdp3Mode in interface IMessageSchemapublic UnifiedMetaData getHeaderType()
IMessageSchemagetHeaderType in interface IMessageSchemapublic MessageSchema.Endianess getEndianess()
public boolean isLittleEndian()
IMessageSchemaisLittleEndian in interface IMessageSchemapublic String getSemanticVersion()
IMessageSchemagetSemanticVersion in interface IMessageSchemapublic String getPackage()
IMessageSchemagetPackage in interface IMessageSchemapublic int getId()
IMessageSchemagetId in interface IMessageSchemapublic Map<String,UnifiedMetaData> getTypes()
public Map<String,UnifiedMetaData> getMessagesByNames()
public String getHeaderTypeName()
public UnifiedMetaData getType(String name)
IMessageSchemagetType in interface IMessageSchemaname - name of a type in schema type dictionarypublic Map<Integer,UnifiedMetaData> getMessages()
IMessageSchemagetMessages in interface IMessageSchemapublic UnifiedMetaData getResolvedHeaderType()
public FramingHeaderSpecification getFramingHeaderSpecification()
public void addMessage(UnifiedMetaData message)
public void resolveInternalLinks()
public void recognizeTypes()
public void buildVirtualFields()
public void resolveOffsets()
public void resolveValues()
public UnifiedMetaData findType(Function<UnifiedMetaData,Boolean> condition)
public void resolveHeaders()
public void validate()
public int queryVirtualFieldId(String[] fieldPath)
The method returns unique ID assigned to an element of the composite-type field. This ID does not complain to the FIX/SBE identifier rules. In particular, it has less than zero value and never repeats between different fieldsets, even if the fields has the same type and semantics.
Path to the field is array of strings where each string represents field name (or ID), caounting from the level top of the message. The asterisk ("*") in zero position means access to the message header.
queryVirtualFieldId in interface IMessageSchemafieldPath - Path to the field.Copyright © 2005–2025 Onix Solutions. All rights reserved.