|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.codestreet.messageforge.RMsg
Base class for all message classes. A message contains a collection of RFld
instances. Each message implements a fast-fail strategy for field validations -
i.e. a field is validated each time its value is set. To make sure that a
message is valid it is still important to call validate()
to make
sure that all non-optional fields have been set.
In the typical usage, a message object is defined via XML and the JAVA class for the message generated by the code-generator. In some other applications, it might be necessary to have the ability to create empty messages - messages with no fields - and add fields to these messages on the fly. Fields can be created explicitly or by using the RFldFactory.
Field Summary | |
protected java.lang.String |
desc_
Message description. |
protected boolean |
emptyMsg_
Field to indicate if this message has no fields. |
protected static char |
EXPOSED_FIELD_DELIMITER
Delimiter for exposed fields within string representation. |
protected static char |
FIELD_EQUAL
End delimiter for nested fields within string representation. |
protected java.lang.String |
fixedSendSubject_
Fixed send subject. |
protected java.util.Map |
flds_
Message fields. |
protected RFld[] |
fldsArray_
|
protected static char |
HASHTABLE_ENTRY_DELIMITER
Delimiter for fields within hashtable entry string representation. |
protected static char |
INDIRECT_COMPONENT_DELIMITER
Delimiter for indirect subject components. |
protected boolean |
locked_
Flag to make message immutable. |
protected static java.lang.String |
NA_VALUE
Not Applicable (not set) value. |
protected java.lang.String |
name_
Message name. |
protected static char |
NESTED_FIELD_END
End delimiter for nested fields within string representation. |
protected static char |
NESTED_FIELD_START
Start delimiter for nested fields within string representation. |
protected static java.lang.String |
NESTED_FIELDNAME_DELIMITER
Delimiter for multiple subject specifications. |
protected static boolean |
noCaseFldNames_
Flag to indicate whether access to fields is done in a case-insensitive manner. |
protected java.util.Map |
noCaseFlds_
Message fields - key into the Map is uppercase field names. |
protected java.util.List |
reqGrps_
Required field groups. |
protected static java.lang.String |
SUBJECT_DELIMITER
Delimiter for multiple subject specifications. |
protected static char |
SUBJECT_PARAM_END
Delimiter for end of parameterized subject name component. |
protected static char |
SUBJECT_PARAM_START
Delimiter for start of parameterized subject name component. |
protected static java.lang.String |
SUBJECT_WILDCARD
Wildcard for parameterized subject name component - we use a |
protected static java.util.Hashtable |
subjectParams_
Subject specification parameters. |
protected java.lang.String[] |
subjectSpec_
The send/listen subject specification for this message. |
protected java.lang.String[][] |
subjectSpecComponents_
For each entry in subjectSpec_ this array contains the names of the parameterized components. |
protected java.lang.String |
version_
Version field. |
protected static java.lang.String |
XML_ATTR_NAME
Attribute 'name' of JDOM element. |
Constructor Summary | |
RMsg()
Default constructor. |
|
RMsg(java.lang.String name,
java.lang.String desc)
Constructor. |
Method Summary | |
void |
addBoolean(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a boolean field. |
void |
addDate(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
GAdd a datetime field. |
void |
addDouble(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a double field. |
void |
addField(RFld fld)
Add a field to the message. |
void |
addFloat(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a float field. |
void |
addInt(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add an integer field. |
void |
addLong(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Get the value of a long field. |
void |
addMemo(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a memo field. |
void |
addMsg(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a TibrvMsg field. |
void |
addOpaque(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add an Opaque field. |
protected void |
addRequiredGrp(RRequiredGrp reqGrp)
Add a required group to the message. |
void |
addShort(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a short field. |
void |
addString(java.lang.String fldName,
int fieldId,
java.lang.String fldDesc)
Add a string field. |
int |
apply(RFunctor func)
Apply a functor to all fields in the message. |
boolean |
apply(RFunctor func,
java.lang.String fldName)
Apply a functor to a named field in the message. |
void |
clearSendSubject()
Clears the send subject if it has been fixed. |
void |
createNested()
Create nested fields in message. |
java.lang.Object[] |
diffFields(RMsg another)
Compare this message with another source message and return the names of all fields in the other message that are either not in this message or are in this message but have a different field type. |
protected void |
doneAddingFields()
This method allows subclasses to signal that all fields have been added to the message. |
boolean |
equalIgnoreValues(java.lang.Object anObject,
java.util.Vector ignoreFields)
Check if another message is equal to this message based on a subset of the fields in the messages. |
boolean |
equalIgnoreValuesDebug(java.lang.Object anObject,
java.util.Vector ignoreFields)
Check if another message is equal to this message based on a subset of the fields in the messages. |
boolean |
equals(java.lang.Object anObject)
Check if another message is equal to this message. |
boolean |
equalsDebug(java.lang.Object anObject,
java.lang.StringBuffer sbResultText)
Check if another message is equal to this message. |
boolean |
equalsUsingTaggedFields(java.lang.Object anObject,
java.lang.String tag,
boolean ignoreCase)
Check if another message is equal to this message. |
boolean |
fieldExists(java.lang.String fldName)
Check if a named field exists in this message. |
java.lang.Object |
getBean(java.lang.String fldName)
Get the value of a bean field. |
boolean |
getBoolean(java.lang.String fldName)
Get the value of a boolean field. |
byte |
getByte(java.lang.String fldName)
Get the value of a byte field. |
byte[] |
getBytes(java.lang.String fldName)
Get the value of a opaque field. |
java.util.Date |
getDate(java.lang.String fldName)
Get the value of a datetime field. |
java.lang.String |
getDesc()
Get message description. |
double |
getDouble(java.lang.String fldName)
Get the value of a double field. |
RFld |
getField(java.lang.String fldName)
Get a named field from this message. |
int |
getFieldCount()
Get the number of fields in this message. |
RFld |
getFieldIfExists(java.lang.String fldName)
Get a named field from this message. |
java.util.Iterator |
getFieldNames()
Get all names of all fields in the message. |
java.util.Iterator |
getFields()
Get all fields in the message. |
RFld[] |
getFieldsAsArray()
Get all fields in the message. |
java.lang.Object |
getFieldValueAsObject(java.lang.String fldName)
Get the value of a field. |
java.lang.String |
getFieldValueAsString(java.lang.String fldName)
Get field value as string. |
float |
getFloat(java.lang.String fldName)
Get the value of a float field. |
int |
getInt(java.lang.String fldName)
Get the value of a integer field. |
java.lang.String |
getListenSubject(boolean wildcard)
Get the listen subject for this message. |
java.lang.String |
getListenSubject(java.util.Hashtable params,
boolean wildcard)
Get the listen subject for this message. |
java.lang.String[] |
getListenSubjects(boolean wildcard)
Get the listen subjects for this message. |
java.lang.String[] |
getListenSubjects(java.util.Hashtable params,
boolean wildcard)
Get the listen subjects for this message. |
long |
getLong(java.lang.String fldName)
Get the value of a long field. |
java.lang.String |
getMemo(java.lang.String fldName)
Get the value of a memo field. |
java.lang.String |
getMsgVersion()
Get message specification version. |
java.lang.String |
getName()
Get message name. |
protected java.lang.Object |
getNestedFieldValueAsObject(java.lang.String fldName)
Get the value of a field. |
byte[] |
getOpaque(java.lang.String fldName)
Get the value of a Opaque field. |
java.lang.String |
getSendSubject()
Get the send subject for this message. |
java.lang.String |
getSendSubject(java.util.Hashtable params)
Get the send subject for this message. |
java.lang.String[] |
getSendSubjects()
Get the send subjects for this message. |
java.lang.String[] |
getSendSubjects(java.util.Hashtable params)
Get the send subjects for this message. |
short |
getShort(java.lang.String fldName)
Get the value of a short field. |
java.lang.String |
getString(java.lang.String fldName)
Get the value of a string field. |
protected java.lang.String[] |
getSubjects(java.util.Hashtable params,
boolean wildcard)
Build subjects for this message. |
java.lang.String[] |
getSubjectSpec()
Get the subject specifications. |
java.util.List |
getTaggedFields(java.lang.String searchTag,
boolean ignoreCase)
Get a java.util.List with the names of all fields that have the specified search tag as one of their tags. |
java.lang.Object |
getTibrvMsg(java.lang.String fldName)
Get the value of a TibrvMsg field. |
int |
hashCode()
Similar to the comments for hashcode in java.util.Hashtable Returns the hash code value for the Message. |
boolean |
hasOneSubjectSpec()
Determine if the message has exactly one subject specification. |
boolean |
isConstrained(java.lang.String fldName)
Determine if the value of a named message has any constraints. |
boolean |
isEmptyMsg()
Check if this is an empty message. |
boolean |
isLocked()
Get Lock/Unlock property of the message object. |
boolean |
isLocked(java.lang.String fldName)
Determine if a named message field is locked. |
boolean |
isSendSubjectFixed()
Check if the send subject has been fixed. |
boolean |
isValSet(java.lang.String fldName)
Determine if the value of a named message field has been set. |
void |
notRecuriveValidate()
Validate message. |
void |
resetFields()
Reset all unlocked fields in the message. |
void |
setBean(java.lang.String fldName,
java.lang.Object val)
Set the value of a bean field. |
void |
setBoolean(java.lang.String fldName,
boolean val)
Get the value of a boolean field. |
void |
setByte(java.lang.String fldName,
byte val)
Set the value of a byte field. |
void |
setBytes(java.lang.String fldName,
byte[] val)
Get the value of a opaque field. |
void |
setDate(java.lang.String fldName,
java.util.Date val)
Get the value of a datetime field. |
void |
setDate(java.lang.String fldName,
long val)
Get the value of a datetime field. |
protected void |
setDesc(java.lang.String desc)
Set message description. |
void |
setDouble(java.lang.String fldName,
double val)
Set the value of a double field. |
void |
setEmptyMsg(boolean emptyMsg)
Set the empty attribute of this message. |
void |
setFieldFromObject(java.lang.String fldName,
java.lang.Object val)
Set the value of a field from an object. |
void |
setFields(RMsg another)
Set the field values of this message from another source message. |
protected void |
setFields(RMsg another,
boolean ignoreConstrained)
Set the field values of this message from another source message. |
void |
setFieldsIgnoreConstrained(RMsg another)
Set the field values of this message from another source message. |
void |
setFloat(java.lang.String fldName,
float val)
Set the value of a float field. |
void |
setInt(java.lang.String fldName,
int val)
Set the value of a integer field. |
void |
setLocked(boolean locked)
Lock/Unlock the message object and all its fields. |
void |
setLong(java.lang.String fldName,
long val)
Set the value of a long field. |
void |
setMemo(java.lang.String fldName,
java.lang.String val)
Set the value of a memo field. |
protected void |
setMsgVersion(java.lang.String version)
Set message specification version number. |
protected void |
setName(java.lang.String name)
Set message name. |
void |
setOpaque(java.lang.String fldName,
byte[] val)
Set the value of a Opaque field. |
void |
setSendSubject(java.lang.String fixedSendSubject)
Set the send subject. |
void |
setShort(java.lang.String fldName,
short val)
Set the value of a short field. |
void |
setString(java.lang.String fldName,
java.lang.String val)
Set the value of a string field. |
static void |
setSubjectParams(java.util.Hashtable params)
Set subject parameters. |
protected void |
setSubjectSpec(java.lang.String[] subjectSpec,
java.lang.String[][] subjectSpecComponents)
Set the subject specification. |
void |
setTibrvMsg(java.lang.String fldName,
java.lang.Object val)
Set the value of a TibrvMsg field. |
static void |
setXmlAttrNames(java.lang.String name)
Register custom XML attribute names. |
static void |
setXmlTag(java.lang.String newTag)
Register custom XML field tag. |
static void |
supportNoCaseFldNames(boolean val)
Set the case-insensitive field name option. |
java.lang.String |
toPrettyPrintString()
Get 'pretty print' string representation of message contents. |
java.lang.String |
toString()
Get string representation of message contents. |
void |
validate()
Validate message. |
static java.lang.String |
validateFld(RFld fld,
java.util.List outerFieldNameList)
If the field contains another RMsg, then call validateMsg, otherwise just check if all not optional fields were set. |
static java.lang.String |
validateMsg(RMsg msg,
java.util.List outerFieldNameList)
Recusively validiate the RMsg |
void |
validateRequiredGrps()
Validate required field groups. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String version_
protected java.lang.String name_
protected java.lang.String desc_
protected boolean locked_
protected java.lang.String fixedSendSubject_
protected java.lang.String[] subjectSpec_
protected java.lang.String[][] subjectSpecComponents_
protected java.util.Map flds_
protected transient RFld[] fldsArray_
protected java.util.Map noCaseFlds_
protected boolean emptyMsg_
protected java.util.List reqGrps_
RRequiredGrp
protected static transient java.util.Hashtable subjectParams_
protected static final transient char INDIRECT_COMPONENT_DELIMITER
protected static final transient java.lang.String NESTED_FIELDNAME_DELIMITER
protected static final transient java.lang.String SUBJECT_DELIMITER
protected static final transient char SUBJECT_PARAM_START
protected static final transient char SUBJECT_PARAM_END
protected static final transient java.lang.String SUBJECT_WILDCARD
protected static final transient char EXPOSED_FIELD_DELIMITER
protected static final transient char HASHTABLE_ENTRY_DELIMITER
protected static final transient char NESTED_FIELD_START
protected static final transient char NESTED_FIELD_END
protected static final transient char FIELD_EQUAL
protected static final transient java.lang.String NA_VALUE
protected static transient java.lang.String XML_ATTR_NAME
protected static transient boolean noCaseFldNames_
Constructor Detail |
public RMsg()
setEmptyMsg(boolean)
public RMsg(java.lang.String name, java.lang.String desc)
name
- Message name.desc
- Description of message.Method Detail |
public void createNested()
public final java.util.Iterator getFields()
getFields
in interface RMapMessage
RMapMessage.getFieldsAsArray()
public final RFld[] getFieldsAsArray()
getFieldsAsArray
in interface RMapMessage
RMapMessage.getFields()
protected final void doneAddingFields()
public final java.util.List getTaggedFields(java.lang.String searchTag, boolean ignoreCase)
searchTag
- Search tag. If the search tag is null then the
names of all fields that do not have any tags are returned.ignoreCase
- Case insensitive tag compare is performed if this paramater is
true. Otherwise, case sensitive tag compare is
performed.
RFld.getTags()
,
RFld.setTags(String[])
public final void resetFields()
RFld.isLocked()
,
RFld.reset()
public final void setFields(RMsg another) throws FieldValidationException
another
- Source message.
FieldValidationException
RFld.getType()
,
setFieldsIgnoreConstrained(RMsg)
public final void setFieldsIgnoreConstrained(RMsg another) throws FieldValidationException
another
- Source message.
FieldValidationException
RFld.getType()
,
setFields(RMsg)
protected final void setFields(RMsg another, boolean ignoreConstrained) throws FieldValidationException
another
- Source message.ignoreConstrained
- Flagh to indicate whether constrained fields should be
ignored. If true then fields that have constraints
are not set.
FieldValidationException
RFld.getType()
public final java.lang.Object[] diffFields(RMsg another) throws FieldValidationException
another
- Source message.
FieldValidationException
RFld.getType()
public final java.lang.String getName()
getName
in interface RMapMessage
protected final void setName(java.lang.String name)
name
- Message name.public final java.lang.String getDesc()
protected final void setDesc(java.lang.String desc)
desc
- Message description.public final void addField(RFld fld) throws FieldValidationException
addField
in interface RMapMessage
fld
- Field to add to message.
FieldValidationException
RFld
protected final void addRequiredGrp(RRequiredGrp reqGrp)
reqGrp
- Required group.
java.lang.IllegalArgumentException
- if required group is null.RRequiredGrp
public final void validate() throws FieldValidationException
FieldValidationException
public final void notRecuriveValidate() throws FieldValidationException
FieldValidationException
public static java.lang.String validateMsg(RMsg msg, java.util.List outerFieldNameList)
msg
- The RMsg to validateouterFieldNameList
- a way to keep track of the fieldname during recursion.
public static java.lang.String validateFld(RFld fld, java.util.List outerFieldNameList)
fld
- The RFld to validate.outerFieldNameList
- a way to keep track of the fieldname during recursion.public final void validateRequiredGrps() throws FieldValidationException
FieldValidationException
public final int apply(RFunctor func) throws FieldValidationException
apply
in interface RMapMessage
func
- Functor
FieldValidationException
RFunctor
public final boolean apply(RFunctor func, java.lang.String fldName) throws FieldValidationException
apply
in interface RMapMessage
func
- Functor.fldName
- Field name.
FieldValidationException
RFunctor
public final RFld getFieldIfExists(java.lang.String fldName) throws FieldValidationException
getFieldIfExists
in interface RMapMessage
fldName
- Field name.
FieldValidationException
public final RFld getField(java.lang.String fldName) throws FieldValidationException
getField
in interface RMapMessage
fldName
- Field name.
FieldValidationException
public final boolean isLocked()
public final void setLocked(boolean locked)
locked
- true to lock the object. Otherwise, false
to unlock the object.public final boolean isSendSubjectFixed()
setSendSubject(String)
,
clearSendSubject()
public final void clearSendSubject()
isSendSubjectFixed()
,
setSendSubject(String)
public final void setSendSubject(java.lang.String fixedSendSubject)
fixedSendSubject
- Fixed send subject.isSendSubjectFixed()
,
clearSendSubject()
public static final void setSubjectParams(java.util.Hashtable params)
params
- Map of parameter placeholder values. Key into the hashtable is
the name of the placeholder and the value is the value of the
placeholder. Parameter values in this parameter override field
value substitution. setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final boolean hasOneSubjectSpec()
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
protected final void setSubjectSpec(java.lang.String[] subjectSpec, java.lang.String[][] subjectSpecComponents)
subjectSpec
- One or more subject specifications separated by
SUBJECT_DELIMITER.setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
,
SUBJECT_DELIMITER
public final java.lang.String[] getSubjectSpec()
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String getSendSubject() throws MsgValidationException
MsgValidationException
setSendSubject(String)
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String getSendSubject(java.util.Hashtable params) throws MsgValidationException
params
- Map of parameter placeholder values. Key into the hashtable is
the name of the placeholder and the value is the value of the
placeholder. Parameter values in this parameter override field
value substitution. MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String[] getSendSubjects() throws MsgValidationException
MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String[] getSendSubjects(java.util.Hashtable params) throws MsgValidationException
params
- Map of parameter placeholder values. Key into the hashtable is
the name of the placeholder and the value is the value of the
placeholder. Parameter values in this parameter override field
value substitution. MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String getListenSubject(boolean wildcard) throws MsgValidationException
wildcard
- If true all parameterized components in the subject
specification are converted into wildcard '*'.
MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String getListenSubject(java.util.Hashtable params, boolean wildcard) throws MsgValidationException
params
- Map of parameter placeholder values. Key into the hashtable is
the name of the placeholder and the value is the value of the
placeholder. Values in this parameter override field value
substitution. wildcard
- If true all parameterized components in the subject
specification are converted into wildcard '*'.
MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubjects(boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String[] getListenSubjects(boolean wildcard) throws MsgValidationException
wildcard
- If true all parameterized components in the subject
specification are converted into wildcard '*'.
MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(java.util.Hashtable, boolean)
public final java.lang.String[] getListenSubjects(java.util.Hashtable params, boolean wildcard) throws MsgValidationException
params
- Map of parameter placeholder values. Key into the hashtable is
the name of the placeholder and the value is the value of the
placeholder. Values in this parameter override field value
substitution. wildcard
- If true all parameterized components in the subject
specification are converted into wildcard '*'.
MsgValidationException
setSendSubject(String)
,
getSendSubject()
,
getSendSubject(java.util.Hashtable)
,
getSendSubjects()
,
getSendSubjects(java.util.Hashtable)
,
getListenSubject(boolean)
,
getListenSubject(java.util.Hashtable, boolean)
,
getListenSubjects(boolean)
protected final java.lang.String[] getSubjects(java.util.Hashtable params, boolean wildcard) throws MsgValidationException
params
- wildcard
- Flag to indicate if parameterized subject components should be
converted to wildcard '*'. If true then all the
parameterized subject components are converted to wildcard.
MsgValidationException
public final java.lang.String getMsgVersion()
protected final void setMsgVersion(java.lang.String version)
version
- Message specification version number.public final java.lang.Object getFieldValueAsObject(java.lang.String fldName) throws FieldValidationException
getFieldValueAsObject
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFld
,
RFldTibrvMsg.getValueAsObject(String, String)
protected final java.lang.Object getNestedFieldValueAsObject(java.lang.String fldName) throws FieldValidationException
fldName
- Field name.
FieldValidationException
RFld
public final java.lang.String getFieldValueAsString(java.lang.String fldName) throws FieldValidationException
getFieldValueAsString
in interface RMapMessage
fldName
- Field name.
FieldValidationException
public final java.lang.Object getTibrvMsg(java.lang.String fldName) throws FieldValidationException
getTibrvMsg
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldTibrvMsg
public final byte[] getOpaque(java.lang.String fldName) throws FieldValidationException
getOpaque
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldOpaque
public final java.util.Date getDate(java.lang.String fldName) throws FieldValidationException
getDate
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldDatetime
public final boolean getBoolean(java.lang.String fldName) throws FieldValidationException
getBoolean
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldBool
public final byte[] getBytes(java.lang.String fldName) throws FieldValidationException
getBytes
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldOpaque
public final float getFloat(java.lang.String fldName) throws FieldValidationException
getFloat
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldF32
public final double getDouble(java.lang.String fldName) throws FieldValidationException
getDouble
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldF64
public final byte getByte(java.lang.String fldName) throws FieldValidationException
getByte
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldI8
public final short getShort(java.lang.String fldName) throws FieldValidationException
getShort
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldI16
public final int getInt(java.lang.String fldName) throws FieldValidationException
getInt
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldI32
public final long getLong(java.lang.String fldName) throws FieldValidationException
getLong
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldI64
public final java.lang.Object getBean(java.lang.String fldName) throws FieldValidationException
fldName
- Field name.
FieldValidationException
RFldBean
public final java.lang.String getString(java.lang.String fldName) throws FieldValidationException
getString
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldString
public final java.lang.String getMemo(java.lang.String fldName) throws FieldValidationException
getMemo
in interface RMapMessage
fldName
- Field name.
FieldValidationException
RFldMemo
public final void addMsg(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldTibrvMsg
public final void addOpaque(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldOpaque
public final void addDate(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldDatetime
public final void addBoolean(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldBool
public final void addFloat(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldF32
public final void addDouble(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldF64
public final void addShort(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldI16
public final void addInt(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldI32
public final void addLong(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldI64
public final void addString(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldString
public final void addMemo(java.lang.String fldName, int fieldId, java.lang.String fldDesc) throws FieldValidationException
fldName
- Field name.fieldId
- Field Id. 0 means the field has no id.fldDesc
- Field description. Can be null.
FieldValidationException
RFldMemo
public final void setTibrvMsg(java.lang.String fldName, java.lang.Object val) throws FieldValidationException
setTibrvMsg
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldTibrvMsg
public final void setOpaque(java.lang.String fldName, byte[] val) throws FieldValidationException
setOpaque
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldOpaque
public final void setDate(java.lang.String fldName, java.util.Date val) throws FieldValidationException
setDate
in interface RMapMessage
fldName
- Field name.val
- value.
FieldValidationException
RFldDatetime
public final void setDate(java.lang.String fldName, long val) throws FieldValidationException
setDate
in interface RMapMessage
fldName
- Field name.val
- value.
FieldValidationException
RFldDatetime
public final void setBoolean(java.lang.String fldName, boolean val) throws FieldValidationException
setBoolean
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldBool
public final void setBytes(java.lang.String fldName, byte[] val) throws FieldValidationException
setBytes
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldOpaque
public final void setFloat(java.lang.String fldName, float val) throws FieldValidationException
setFloat
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldF32
public final void setDouble(java.lang.String fldName, double val) throws FieldValidationException
setDouble
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldF64
public final void setByte(java.lang.String fldName, byte val) throws FieldValidationException
fldName
- Field name.val
- Field value.
FieldValidationException
RFldI8
public final void setShort(java.lang.String fldName, short val) throws FieldValidationException
setShort
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldI16
public final void setInt(java.lang.String fldName, int val) throws FieldValidationException
setInt
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldI32
public final void setLong(java.lang.String fldName, long val) throws FieldValidationException
setLong
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldI64
public final void setFieldFromObject(java.lang.String fldName, java.lang.Object val) throws FieldValidationException
setFieldFromObject
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFld
public final void setBean(java.lang.String fldName, java.lang.Object val) throws FieldValidationException
fldName
- Field name.val
- Field value.
FieldValidationException
RFldString
public final void setString(java.lang.String fldName, java.lang.String val) throws FieldValidationException
setString
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldString
public final void setMemo(java.lang.String fldName, java.lang.String val) throws FieldValidationException
setMemo
in interface RMapMessage
fldName
- Field name.val
- Field value.
FieldValidationException
RFldMemo
public final boolean fieldExists(java.lang.String fldName)
fieldExists
in interface RMapMessage
fldName
- Field name.
public final boolean isValSet(java.lang.String fldName) throws FieldValidationException
isValSet
in interface RMapMessage
fldName
- Field name.
FieldValidationException
public final boolean isConstrained(java.lang.String fldName) throws FieldValidationException
isConstrained
in interface RMapMessage
fldName
- Field name.
FieldValidationException
public final boolean isLocked(java.lang.String fldName) throws FieldValidationException
isLocked
in interface RMapMessage
fldName
- Field name.
FieldValidationException
public final int getFieldCount()
public final java.util.Iterator getFieldNames()
getFieldNames
in interface RMapMessage
public final boolean isEmptyMsg()
isEmptyMsg
in interface RMapMessage
setEmptyMsg(boolean)
public final void setEmptyMsg(boolean emptyMsg)
emptyMsg
- true if this is an empty message. Otherwise
false.isEmptyMsg()
public static final void supportNoCaseFldNames(boolean val)
val
- If true then the framework allows field names to be
accessed in a case-insensitive manner. Otherwise, field names
are case sensitive.public static final void setXmlTag(java.lang.String newTag) throws FieldValidationException
newTag
- New XML field tag.
FieldValidationException
public static final void setXmlAttrNames(java.lang.String name) throws FieldValidationException
name
- New name of the message name attribute.
FieldValidationException
public java.lang.String toPrettyPrintString()
public java.lang.String toString()
public boolean equals(java.lang.Object anObject)
anObject
- Another message.
public boolean equalsUsingTaggedFields(java.lang.Object anObject, java.lang.String tag, boolean ignoreCase)
anObject
- Another message.tag
- Tag to look for.ignoreCase
- If true then tag search is case-insensitive.
equals(Object)
public boolean equalsDebug(java.lang.Object anObject, java.lang.StringBuffer sbResultText)
anObject
- Another message.sbResultText
- -
StringBuffer object to print non-matching fields
public boolean equalIgnoreValuesDebug(java.lang.Object anObject, java.util.Vector ignoreFields)
anObject
- Another message.ignoreFields
- Field to ignore when checking for equality.public boolean equalIgnoreValues(java.lang.Object anObject, java.util.Vector ignoreFields)
anObject
- Another message.ignoreFields
- Fields to ignore when checking for equality.public int hashCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |