All Packages Class Hierarchy This Package Previous Next Index
Class bea.jolt.JoltMessage
java.lang.Object
|
+----bea.jolt.JoltMessage
- public class JoltMessage
- extends 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
-
addByte(String, byte)
- Add a byte item referred by its name.
-
addBytes(String, byte[], int)
- Add a byte-array item referred by its name.
-
addDouble(String, double)
- Add a double item referred by its name.
-
addFloat(String, float)
- Add a float item referred by its name.
-
addInt(String, int)
- Add an int item referred by its name.
-
addMessage(String, JoltMessage)
- Add a message item referred by its name.
-
addShort(String, short)
- Add a short item referred by its name.
-
addString(String, String)
- Add a string item referred by its name.
-
clear()
- Remove all items from the message object.
-
delete(String)
- Delete the first item with the matching name.
-
deleteItem(String, int)
- Delete an instance of an item referred by its name.
-
enableAccessCheck(boolean)
- Enable (default) or disable the checking for access (read-only or
write-only.) This method applys to JoltBeans.
-
getByteDef(String, byte)
- Get the 1st item based on its name.
-
getByteItemDef(String, int, byte)
- Get an occurrence of a named item of byte data type.
-
getBytesDef(String, byte[])
- Get the 1st item based on its name.
-
getBytesItemDef(String, int, byte[])
- Get an occurrence of a named item of byte-array data type.
-
getDefinition()
- Get the message definition.
-
getDoubleDef(String, double)
- Get the 1st item based on its name.
-
getDoubleItemDef(String, int, double)
- Get an occurrence of a named item of double data type.
-
getFloatDef(String, float)
- Get the 1st item based on its name.
-
getFloatItemDef(String, int, float)
- Get an occurrence of a named item of float data type.
-
getHashTable()
- Get the table that stores the values.
-
getIntDef(String, int)
- Get the 1st item based on its name.
-
getIntItemDef(String, int, int)
- Get an occurrence of a named item of int data type.
-
getMessageDef(String, JoltMessage)
- Get the 1st item based on its name.
-
getMessageItemDef(String, int, JoltMessage)
- Get an occurrence of a named item of the JoltMessage data type.
-
getNames()
- Get the field names in the message.
-
getOccurrenceCount(String)
- Get the number of occurrence of a named item.
-
getShortDef(String, short)
- Get the 1st item based on its name.
-
getShortItemDef(String, int, short)
- Get an occurrence of a named item of short data type.
-
getStringDef(String, String)
- Get the 1st item based on its name.
-
getStringItemDef(String, int, String)
- Get an occurrence of a named item of string data type.
-
setByte(String, byte)
- Change the value for the first instance of the named item
of byte data type.
-
setByteItem(String, int, byte)
- Change the byte value of an occurrence of the named item.
-
setBytes(String, byte[], int)
- Change the value for the first instance of the named item of
byte-array data type.
-
setBytesItem(String, int, byte[], int)
- Change the byte-array value of an occurrence of the named item.
-
setDouble(String, double)
- Change the value for the first instance of the named item
of double data type.
-
setDoubleItem(String, int, double)
- Change the double value of an occurrence of the named item.
-
setFloat(String, float)
- Change the value for the first instance of the named item
of a float data type.
-
setFloatItem(String, int, float)
- Change the float value of an occurrence of the named item.
-
setInt(String, int)
- Change the value for the first instance of the named item
of int data type.
-
setIntItem(String, int, int)
- Change the int value of an occurrence of the named item.
-
setMessage(String, JoltMessage)
- Change the value for the first instance of the named item of
JoltMessage data type.
-
setMessageItem(String, int, JoltMessage)
- Change the message object of an occurrence of the named item.
-
setShort(String, short)
- Change the value for the first instance of the named item
of short data type.
-
setShortItem(String, int, short)
- Change the short value of an occurrence of the named item.
-
setString(String, String)
- Change the value for the first instance of the named item of a
string data type.
-
setStringItem(String, int, String)
- Change the string value of an occurrence of the named item.
-
toString()
-
clear
public void clear()
- Remove all items from the message object.
enableAccessCheck
public void enableAccessCheck(boolean enable)
- Enable (default) or disable the checking for access (read-only or
write-only.) This method applys to JoltBeans.
- Parameters:
- enable - true to enable the checking; otherwise, false.
addByte
public void addByte(String name,
byte val)
- Add a byte item referred by its name. Usually the added item
is position-independent. To minimize any programming error, use
the alias field if the item has multiple occurrence and the
position of the item is important.
- Parameters:
- name - The name of the item to be added.
- val - The byte value to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addShort
public void addShort(String name,
short val)
- Add a short item referred by its name. The added item is usually
position independent. To minimize any programming error, use
the alias field if the item has multiple occurrence and the
position of the item is important.
- Parameters:
- name - The name of the item to be added.
- val - The short value to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addInt
public void addInt(String name,
int val)
- Add an int item referred by its name. The added item
is position-independent. To minimize any programming error, use
the alias field if the item has multiple occurrence and the
position of the item is important.
- Parameters:
- name - The name of the item to be added.
- val - The int value to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addFloat
public void addFloat(String name,
float val)
- Add a float item referred by its name. The added item is usually
position independent. To minimize any programming error, use
the alias field if the item has multiple occurrence and the
position of the item is important.
- Parameters:
- name - The name of the item to be added.
- val - The float value to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addDouble
public void addDouble(String name,
double val)
- Add a double item referred by its name. The added item is usually
position independent. To minimize any programming error,
use the alias field if the item has multiple occurrence and the
position of the item is important.
- Parameters:
- name - The name of the item to be added.
- val - The double value to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addString
public void addString(String name,
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 occurrence and if the
position of the item is important.
- Parameters:
- name - The name of the item to be added.
- val - The string value to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addMessage
public void addMessage(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 occurrence and the
position of the item is important. Since TUXEDO does not support
nested, structured information with its messages, do not use
this for FML or VIEW buffer type.
- Parameters:
- name - The name of the item to be added.
- val - The message to be added.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
addBytes
public void addBytes(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 occurrence and the
position of the item is important.
- 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: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IllegalMethodException
- Cannot use this method on alias
field.
setByte
public void setByte(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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The byte value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setShort
public void setShort(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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The short value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setInt
public void setInt(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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The int value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setFloat
public void setFloat(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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The float value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setDouble
public void setDouble(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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The double value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setString
public void setString(String name,
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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The string value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setMessage
public void setMessage(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: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setBytes
public void setBytes(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.
- Parameters:
- name - The name of the item to be set or changed.
- val - The byte-array value to be set or changed to.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setByteItem
public void setByteItem(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 doesn't exist, it
will be added. All prior non-existing instances will be added with
default null value.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The byte value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setShortItem
public void setShortItem(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 doesn't exist, it
will be added. All prior, non-existing instances will be added with the
default value of 0.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The short value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setIntItem
public void setIntItem(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 doesn't exist, it
will be added. All prior, non-existing instances will be added with the
default value of 0.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The int value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setFloatItem
public void setFloatItem(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 doesn't exist, it
will be added. All prior non-existing instances will be inserted
with default value of 0.0.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The float value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setDoubleItem
public void setDoubleItem(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 doesn't exist, it
will be added. All prior non-existing instances will be inserted
with the default value of 0.0.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The double value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setStringItem
public void setStringItem(String name,
int itemNo,
String val)
- Change the string value of an occurrence of the named item. The
occurrence number starts at 0. If the item doesn't exist, it
will be added. All prior non-existing instances will be added with the
default "" value.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The string value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setMessageItem
public void setMessageItem(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 doesn't 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: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
setBytesItem
public void setBytesItem(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 doesn't exist, it
will be added. All prior non-existing instances will be inserted
with the default value value of null.
- Parameters:
- name - The name of the item.
- itemNo - The occurrence number.
- val - The byte-array value.
- len - The length of the byte-array.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
getOccurrenceCount
public synchronized int getOccurrenceCount(String name)
- Get the number of occurrence of a named item.
- Parameters:
- name - The name of the item.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getByteDef
public byte getByteDef(String name,
byte def)
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default byte value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getShortDef
public short getShortDef(String name,
short def)
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default short value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getIntDef
public int getIntDef(String name,
int def)
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default int value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getFloatDef
public float getFloatDef(String name,
float def)
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default float value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getDoubleDef
public double getDoubleDef(String name,
double def)
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default double value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getStringDef
public String getStringDef(String name,
String def)
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default string value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getMessageDef
public JoltMessage getMessageDef(String name,
JoltMessage def)
- Get the 1st 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: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getBytesDef
public byte[] getBytesDef(String name,
byte def[])
- Get the 1st item based on its name. If it does not exist, the
default value will be returned.
- Parameters:
- name - The name of the item.
- def - The default byte-array value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is not an output item.
getByteItemDef
public byte getByteItemDef(String name,
int itemNo,
byte def)
- Get an occurrence of a named item of byte data type. The
occurrence starts from 0. If it doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- A byte value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getShortItemDef
public short getShortItemDef(String name,
int itemNo,
short def)
- Get an occurrence of a named item of short data type. The
occurrence starts from 0. If it doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- A short value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getIntItemDef
public int getIntItemDef(String name,
int itemNo,
int def)
- Get an occurrence of a named item of int data type. The
occurrence starts from 0. If it doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- An int value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getFloatItemDef
public float getFloatItemDef(String name,
int itemNo,
float def)
- Get an occurrence of a named item of float data type. The
occurrence starts from 0. If it doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- A float value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getDoubleItemDef
public double getDoubleItemDef(String name,
int itemNo,
double def)
- Get an occurrence of a named item of double data type. The
occurrence starts from 0. If it doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- A double value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getStringItemDef
public String getStringItemDef(String name,
int itemNo,
String def)
- Get an occurrence of a named item of string data type. The
occurrence starts from 0. If it doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- A string value.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getMessageItemDef
public JoltMessage getMessageItemDef(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 doesn't 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: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getBytesItemDef
public byte[] getBytesItemDef(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 doesn't exist, the default value
will be returned.
- Parameters:
- name - Name of the item.
- itemNo - Occurrence number of the item.
- def - Default value.
- Returns:
- A byte-array object.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- It is an output item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
delete
public void delete(String name)
- Delete the first item with the matching name.
- Parameters:
- name - The name of the item to be deleted.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- Cannot delete an input item.
deleteItem
public synchronized void deleteItem(String name,
int itemNo)
- Delete an instance of an item referred by its name. The instance
starts at 0.
- Parameters:
- name - The name of the item to be deleted.
- itemNo - The occurrence number.
- Throws: NoSuchFieldError
- It is an invalid name.
- Throws: IllegalAccessError
- Cannot delete an input item.
- Throws: IndexOutOfBoundsException
- The itemNo for an alias field
is not 0.
getDefinition
public JoltDefinition getDefinition()
- Get the message definition.
getNames
public Enumeration getNames()
- Get the field names in the message.
getHashTable
public Hashtable getHashTable()
- Get the table that stores the values. This method is for
JoltBeans.
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index