bea.jolt
Class JoltMessage

java.lang.Object
  extended bybea.jolt.JoltMessage
All Implemented Interfaces:
Message

public class JoltMessage
extends java.lang.Object
implements Message

This class encapsulates the attribute-value pair data for the application protocol. This class allows the user to add an input attribute (which should not be position-dependent), set an input attribute (single occurrence or position-independent), delete an input attribute, or get an output attribute from the message.

See Also:
JoltRemoteService, JoltReply

Method Summary
 void addByte(java.lang.String name, byte val)
          Add a byte item referred by its name.
 void addBytes(java.lang.String name, byte[] val, int len)
          Add a byte-array item referred by its name.
 void addDouble(java.lang.String name, double val)
          Add a double item referred by its name.
 void addFloat(java.lang.String name, float val)
          Add a float item referred by its name.
 void addInt(java.lang.String name, int val)
          Add an int item referred by its name.
 void addMBString(java.lang.String name, java.lang.String val)
          Add a mbstring item referred by its name.
 void addMessage(java.lang.String name, JoltMessage val)
          Add a message item referred by its name.
 void addShort(java.lang.String name, short val)
          Add a short item referred by its name.
 void addString(java.lang.String name, java.lang.String val)
          Add a string item referred by its name.
 void clear()
          Remove all items from the message object.
 void delete(java.lang.String name)
          Delete the first item with the matching name.
 void deleteItem(java.lang.String name, int itemNo)
          Delete an instance of an item referred by its name.
 void enableAccessCheck(boolean enable)
          Enable (default) or disable the checking for access (read-only or write-only).
 byte getByteDef(java.lang.String name, byte def)
          Get the first item based on its name.
 byte getByteItemDef(java.lang.String name, int itemNo, byte def)
          Get an occurrence of a named item of byte data type.
 byte[] getBytesDef(java.lang.String name, byte[] def)
          Get the first item based on its name.
 byte[] getBytesItemDef(java.lang.String name, int itemNo, byte[] def)
          Get an occurrence of a named item of byte-array data type.
 JoltDefinition getDefinition()
          Get the message definition.
 double getDoubleDef(java.lang.String name, double def)
          Get the first item based on its name.
 double getDoubleItemDef(java.lang.String name, int itemNo, double def)
          Get an occurrence of a named item of double data type.
 float getFloatDef(java.lang.String name, float def)
          Get the first item based on its name.
 float getFloatItemDef(java.lang.String name, int itemNo, float def)
          Get an occurrence of a named item of float data type.
 java.util.Hashtable getHashTable()
          Get the table that stores the values.
 int getIntDef(java.lang.String name, int def)
          Get the first item based on its name.
 int getIntItemDef(java.lang.String name, int itemNo, int def)
          Get an occurrence of a named item of int data type.
 java.lang.String getMBStringDef(java.lang.String name, java.lang.String def)
          Get the first item based on its name.
 java.lang.String getMBStringItemDef(java.lang.String name, int itemNo, java.lang.String def)
          Get an occurrence of a named item of mbstring data type.
 JoltMessage getMessageDef(java.lang.String name, JoltMessage def)
          Get the first item based on its name.
 JoltMessage getMessageItemDef(java.lang.String name, int itemNo, JoltMessage def)
          Get an occurrence of a named item of the JoltMessage data type.
 java.util.Enumeration getNames()
          Get the field names in the message.
 int getOccurrenceCount(java.lang.String name)
          Get the number of occurrence of a named item.
 short getShortDef(java.lang.String name, short def)
          Get the first item based on its name.
 short getShortItemDef(java.lang.String name, int itemNo, short def)
          Get an occurrence of a named item of short data type.
 java.lang.String getStringDef(java.lang.String name, java.lang.String def)
          Get the first item based on its name.
 java.lang.String getStringItemDef(java.lang.String name, int itemNo, java.lang.String def)
          Get an occurrence of a named item of string data type.
 void setByte(java.lang.String name, byte val)
          Change the value for the first instance of the named item of byte data type.
 void setByteItem(java.lang.String name, int itemNo, byte val)
          Change the byte value of an occurrence of the named item.
 void setBytes(java.lang.String name, byte[] val, int len)
          Change the value for the first instance of the named item of byte-array data type.
 void setBytesItem(java.lang.String name, int itemNo, byte[] val, int len)
          Change the byte-array value of an occurrence of the named item.
 void setDouble(java.lang.String name, double val)
          Change the value for the first instance of the named item of double data type.
 void setDoubleItem(java.lang.String name, int itemNo, double val)
          Change the double value of an occurrence of the named item.
 void setFloat(java.lang.String name, float val)
          Change the value for the first instance of the named item of a float data type.
 void setFloatItem(java.lang.String name, int itemNo, float val)
          Change the float value of an occurrence of the named item.
 void setInt(java.lang.String name, int val)
          Change the value for the first instance of the named item of int data type.
 void setIntItem(java.lang.String name, int itemNo, int val)
          Change the int value of an occurrence of the named item.
 void setMBString(java.lang.String name, java.lang.String val)
          Change the value for the first instance of the named item of a mbstring data type.
 void setMBStringItem(java.lang.String name, int itemNo, java.lang.String val)
          Change the mbstring value of an occurrence of the named item.
 void setMessage(java.lang.String name, JoltMessage val)
          Change the value for the first instance of the named item of JoltMessage data type.
 void setMessageItem(java.lang.String name, int itemNo, JoltMessage val)
          Change the message object of an occurrence of the named item.
 void setShort(java.lang.String name, short val)
          Change the value for the first instance of the named item of short data type.
 void setShortItem(java.lang.String name, int itemNo, short val)
          Change the short value of an occurrence of the named item.
 void setString(java.lang.String name, java.lang.String val)
          Change the value for the first instance of the named item of a string data type.
 void setStringItem(java.lang.String name, int itemNo, java.lang.String val)
          Change the string value of an occurrence of the named item.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

clear

public void clear()
Remove all items from the message object.

Specified by:
clear in interface Message

enableAccessCheck

public void enableAccessCheck(boolean enable)
Enable (default) or disable the checking for access (read-only or write-only). This method applies to JoltBeans.

Parameters:
enable - true to enable the checking; otherwise, false.

addByte

public void addByte(java.lang.String name,
                    byte val)
Add a byte item referred by its name. Usually the added item is position-independent. If the item has multiple occurrences, and the position of the item is important, use the alias field to minimize any programming error.

Specified by:
addByte in interface Message
Parameters:
name - The name of the item to be added.
val - The byte value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addShort

public void addShort(java.lang.String name,
                     short val)
Add a short item referred by its name. The added item is usually position-independent. If the item has multiple occurrences, and the position of the item is important, use the alias field to minimize any programming error.

Specified by:
addShort in interface Message
Parameters:
name - The name of the item to be added.
val - The short value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addInt

public void addInt(java.lang.String name,
                   int val)
Add an int item referred by its name. The added item is position-independent. If the item has multiple occurrences, and the position of the item is important, use the alias field to minimize any programming error.

Specified by:
addInt in interface Message
Parameters:
name - The name of the item to be added.
val - The int value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addFloat

public void addFloat(java.lang.String name,
                     float val)
Add a float item referred by its name. The added item is usually position-independent. If the item has multiple occurrences, and the position of the item is important, use the alias field to minimize any programming error.

Specified by:
addFloat in interface Message
Parameters:
name - The name of the item to be added.
val - The float value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addDouble

public void addDouble(java.lang.String name,
                      double val)
Add a double item referred by its name. The added item is usually position- The double value to be added.

Specified by:
addDouble in interface Message
Parameters:
name - The name of the item to be added.
val - The double value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addString

public void addString(java.lang.String name,
                      java.lang.String val)
Add a string item referred by its name. The added item is usually position-independent. To minimize programming errors, use the alias field if the item has multiple occurrences and if the position of the item is important.

Specified by:
addString in interface Message
Parameters:
name - The name of the item to be added.
val - The string value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addMessage

public void addMessage(java.lang.String name,
                       JoltMessage val)
Add a message item referred by its name. The added item is usually position-independent. To minimize programming errors, use the alias field if the item has multiple occurrences and the position of the item is important. Since Tuxedo does not support nested, structured information with its messages, do not use this for an FML or VIEW buffer type.

Parameters:
name - The name of the item to be added.
val - The message to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addBytes

public void addBytes(java.lang.String name,
                     byte[] val,
                     int len)
Add a byte-array item referred by its name. The added item is usually position-independent. To minimize programming errors, use the alias field if the item has multiple occurrences and the position of the item is important.

Specified by:
addBytes in interface Message
Parameters:
name - The name of the item to be added.
val - The byte-array value to be added.
len - The number of bytes to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

addMBString

public void addMBString(java.lang.String name,
                        java.lang.String val)
Add a mbstring item referred by its name. The added item is usually position-independent. To minimize programming errors, use the alias field if the item has multiple occurrences and if the position of the item is important.

Specified by:
addMBString in interface Message
Parameters:
name - The name of the item to be added.
val - The mbstring value to be added.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
IllegalMethodException - Cannot use this method on an alias field.

setByte

public void setByte(java.lang.String name,
                    byte val)
Change the value for the first instance of the named item of byte data type. If the item does not exist, it will be added.

Specified by:
setByte in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The byte value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setShort

public void setShort(java.lang.String name,
                     short val)
Change the value for the first instance of the named item of short data type. If the item does not exist, it will be added.

Specified by:
setShort in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The short value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setInt

public void setInt(java.lang.String name,
                   int val)
Change the value for the first instance of the named item of int data type. If the item does not exist, it will be added.

Specified by:
setInt in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The int value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setFloat

public void setFloat(java.lang.String name,
                     float val)
Change the value for the first instance of the named item of a float data type. If the item does not exist, it will be added.

Specified by:
setFloat in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The float value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setDouble

public void setDouble(java.lang.String name,
                      double val)
Change the value for the first instance of the named item of double data type. If the item does not exist, it will be added.

Specified by:
setDouble in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The double value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setString

public void setString(java.lang.String name,
                      java.lang.String val)
Change the value for the first instance of the named item of a string data type. If the item does not exist, it will be added.

Specified by:
setString in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The string value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setMessage

public void setMessage(java.lang.String name,
                       JoltMessage val)
Change the value for the first instance of the named item of JoltMessage data type. If the item does not exist, it will be added. Currently it is not supported for FML or VIEW buffer type services.

Parameters:
name - The name of the item to be set or changed.
val - The message to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setBytes

public void setBytes(java.lang.String name,
                     byte[] val,
                     int len)
Change the value for the first instance of the named item of byte-array data type. If the item does not exist, it will be added.

Specified by:
setBytes in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The byte-array value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setMBString

public void setMBString(java.lang.String name,
                        java.lang.String val)
Change the value for the first instance of the named item of a mbstring data type. If the item does not exist, it will be added.

Specified by:
setMBString in interface Message
Parameters:
name - The name of the item to be set or changed.
val - The string value to be set or changed to.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setByteItem

public void setByteItem(java.lang.String name,
                        int itemNo,
                        byte val)
Change the byte value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be added with default null value.

Specified by:
setByteItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The byte value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setShortItem

public void setShortItem(java.lang.String name,
                         int itemNo,
                         short val)
Change the short value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior, non-existing instances will be added with the default value of 0.

Specified by:
setShortItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The short value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setIntItem

public void setIntItem(java.lang.String name,
                       int itemNo,
                       int val)
Change the int value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior, non-existing instances will be added with the default value of 0.

Specified by:
setIntItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The int value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setFloatItem

public void setFloatItem(java.lang.String name,
                         int itemNo,
                         float val)
Change the float value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be inserted with default value of 0.0.

Specified by:
setFloatItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The float value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setDoubleItem

public void setDoubleItem(java.lang.String name,
                          int itemNo,
                          double val)
Change the double value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be inserted with the default value of 0.0.

Specified by:
setDoubleItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The double value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setStringItem

public void setStringItem(java.lang.String name,
                          int itemNo,
                          java.lang.String val)
Change the string value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be added with the default "" value.

Specified by:
setStringItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The string value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setMessageItem

public void setMessageItem(java.lang.String name,
                           int itemNo,
                           JoltMessage val)
Change the message object of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be inserted with default null value. Currently it is not suppored for FML or VIEW buffer type services.

Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The message object.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setBytesItem

public void setBytesItem(java.lang.String name,
                         int itemNo,
                         byte[] val,
                         int len)
Change the byte-array value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be inserted with the default value value of null.

Specified by:
setBytesItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The byte-array value.
len - The length of the byte-array.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

setMBStringItem

public void setMBStringItem(java.lang.String name,
                            int itemNo,
                            java.lang.String val)
Change the mbstring value of an occurrence of the named item. The occurrence number starts at 0. If the item does not exist, it will be added. All prior non-existing instances will be added with the default "" value.

Specified by:
setMBStringItem in interface Message
Parameters:
name - The name of the item.
itemNo - The occurrence number.
val - The mbstring value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.

getOccurrenceCount

public int getOccurrenceCount(java.lang.String name)
Get the number of occurrence of a named item.

Specified by:
getOccurrenceCount in interface Message
Parameters:
name - The name of the item.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getByteDef

public byte getByteDef(java.lang.String name,
                       byte def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getByteDef in interface Message
Parameters:
name - The name of the item.
def - The default byte value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getShortDef

public short getShortDef(java.lang.String name,
                         short def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getShortDef in interface Message
Parameters:
name - The name of the item.
def - The default short value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getIntDef

public int getIntDef(java.lang.String name,
                     int def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getIntDef in interface Message
Parameters:
name - The name of the item.
def - The default int value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getFloatDef

public float getFloatDef(java.lang.String name,
                         float def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getFloatDef in interface Message
Parameters:
name - The name of the item.
def - The default float value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getDoubleDef

public double getDoubleDef(java.lang.String name,
                           double def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getDoubleDef in interface Message
Parameters:
name - The name of the item.
def - The default double value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getStringDef

public java.lang.String getStringDef(java.lang.String name,
                                     java.lang.String def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getStringDef in interface Message
Parameters:
name - The name of the item.
def - The default string value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getMessageDef

public JoltMessage getMessageDef(java.lang.String name,
                                 JoltMessage def)
Get the first item based on its name. If it does not exist, the default value will be returned. Currently it is not supported for FML or VIEW buffer type service.

Parameters:
name - The name of the item.
def - The default Message object.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getBytesDef

public byte[] getBytesDef(java.lang.String name,
                          byte[] def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getBytesDef in interface Message
Parameters:
name - The name of the item.
def - The default byte-array value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getMBStringDef

public java.lang.String getMBStringDef(java.lang.String name,
                                       java.lang.String def)
Get the first item based on its name. If it does not exist, the default value will be returned.

Specified by:
getMBStringDef in interface Message
Parameters:
name - The name of the item.
def - The default mbstring value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is not an output item.

getByteItemDef

public byte getByteItemDef(java.lang.String name,
                           int itemNo,
                           byte def)
Get an occurrence of a named item of byte data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getByteItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A byte value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getShortItemDef

public short getShortItemDef(java.lang.String name,
                             int itemNo,
                             short def)
Get an occurrence of a named item of short data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getShortItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A short value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getIntItemDef

public int getIntItemDef(java.lang.String name,
                         int itemNo,
                         int def)
Get an occurrence of a named item of int data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getIntItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
An int value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getFloatItemDef

public float getFloatItemDef(java.lang.String name,
                             int itemNo,
                             float def)
Get an occurrence of a named item of float data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getFloatItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A float value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getDoubleItemDef

public double getDoubleItemDef(java.lang.String name,
                               int itemNo,
                               double def)
Get an occurrence of a named item of double data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getDoubleItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A double value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getStringItemDef

public java.lang.String getStringItemDef(java.lang.String name,
                                         int itemNo,
                                         java.lang.String def)
Get an occurrence of a named item of string data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getStringItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A string value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getMessageItemDef

public JoltMessage getMessageItemDef(java.lang.String name,
                                     int itemNo,
                                     JoltMessage def)
Get an occurrence of a named item of the JoltMessage data type. The occurrence starts from 0. If it does not exist, the default value will be returned. Currently it is not supported for FML or VIEW buffer type services.

Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A message object.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getBytesItemDef

public byte[] getBytesItemDef(java.lang.String name,
                              int itemNo,
                              byte[] def)
Get an occurrence of a named item of byte-array data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getBytesItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A byte-array object.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getMBStringItemDef

public java.lang.String getMBStringItemDef(java.lang.String name,
                                           int itemNo,
                                           java.lang.String def)
Get an occurrence of a named item of mbstring data type. The occurrence starts from 0. If it does not exist, the default value will be returned.

Specified by:
getMBStringItemDef in interface Message
Parameters:
name - Name of the item.
itemNo - Occurrence number of the item.
def - Default value.
Returns:
A string value.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - It is an output item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

delete

public void delete(java.lang.String name)
Delete the first item with the matching name.

Specified by:
delete in interface Message
Parameters:
name - The name of the item to be deleted.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - Cannot delete an input item.

deleteItem

public void deleteItem(java.lang.String name,
                       int itemNo)
Delete an instance of an item referred by its name. The instance starts at 0.

Specified by:
deleteItem in interface Message
Parameters:
name - The name of the item to be deleted.
itemNo - The occurrence number.
Throws:
java.lang.NoSuchFieldError - It is an invalid name.
java.lang.IllegalAccessError - Cannot delete an input item.
java.lang.IndexOutOfBoundsException - The itemNo for an alias field is not 0.

getDefinition

public JoltDefinition getDefinition()
Get the message definition.


getNames

public java.util.Enumeration getNames()
Get the field names in the message.


getHashTable

public java.util.Hashtable getHashTable()
Get the table that stores the values. This method is for JoltBeans.


toString

public java.lang.String toString()