public interface IMessage
extends java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
<M extends IMessage> |
cloneMessage() |
java.lang.String |
getAbbrev() |
java.lang.Number |
getAsNumber(java.lang.String fieldName)
Retrieve the value of the field as a Number
|
java.lang.String |
getAsString(java.lang.String fieldName)
Retrieve the value of a field as a String
|
java.lang.String[] |
getFieldNames() |
java.lang.Object |
getHeaderValue(java.lang.String field) |
java.lang.String |
getLongFieldName(java.lang.String fieldName)
Retrieve the long name (human readable) of a given field
|
java.lang.String |
getLongName() |
int |
getMgid() |
IMessageProtocol<? extends IMessage> |
getProtocolFactory() |
java.lang.String |
getTypeOf(java.lang.String fieldName)
Retrieve the field type of the given field
|
java.lang.String |
getUnitsOf(java.lang.String fieldName)
Retrieves the units of the given field
|
java.lang.Object |
getValue(java.lang.String fieldName)
Retrieve the value of a field as an Object
|
boolean |
hasFlag(java.lang.String flagName)
Verify if the message has the given flag set
|
IMessage |
setValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of a field to the given Object
|
void |
validate()
Verifies if the message is valid by generating exceptions when the message is not valid
|
int getMgid()
java.lang.String getAbbrev()
java.lang.String getLongName()
java.lang.String[] getFieldNames()
void validate() throws InvalidMessageException
InvalidMessageException
java.lang.Object getValue(java.lang.String fieldName)
fieldName
- The name of the field to consultjava.lang.String getAsString(java.lang.String fieldName)
fieldName
- The name of the field to consultjava.lang.Number getAsNumber(java.lang.String fieldName)
fieldName
- The name of the field to consultjava.lang.String getTypeOf(java.lang.String fieldName)
java.lang.String getUnitsOf(java.lang.String fieldName)
boolean hasFlag(java.lang.String flagName)
java.lang.String getLongFieldName(java.lang.String fieldName)
fieldName
- The field's (abbreviated) nameIMessage setValue(java.lang.String fieldName, java.lang.Object value) throws InvalidFieldException
fieldName
- The name of the field to be changedvalue
- The new value to be given to the fieldInvalidFieldException
- in case this field does not exist in the messageIMessageProtocol<? extends IMessage> getProtocolFactory()
<M extends IMessage> M cloneMessage()
java.lang.Object getHeaderValue(java.lang.String field)