|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.huihoo.jfox.ms.jms.message.MessageImpl
org.huihoo.jfox.ms.jms.message.MapMessageImpl
Description: A MapMessage object is used to send a set of
name-value pairs. The names are String objects, and the
values are primitive data types in the Java programming language. The
entries can be accessed sequentially or randomly by name. The order of the
entries is undefined. MapMessage inherits from the
Message interface and adds a message body that contains a Map.
| Field Summary |
| Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
| Constructor Summary | |
MapMessageImpl()
Default constructor. |
|
| Method Summary | |
void |
clearBody()
Clear out the message body. |
boolean |
getBoolean(java.lang.String name)
Returns the boolean value with the specified name. |
byte |
getByte(java.lang.String name)
Returns the byte value with the specified name. |
byte[] |
getBytes(java.lang.String name)
Returns the byte array value with the specified name. |
char |
getChar(java.lang.String name)
Returns the Unicode character value with the specified name. |
double |
getDouble(java.lang.String name)
Returns the double value with the specified name. |
float |
getFloat(java.lang.String name)
Returns the float value with the specified name. |
int |
getInt(java.lang.String name)
Returns the int value with the specified name. |
long |
getLong(java.lang.String name)
Returns the long value with the specified name. |
java.util.Enumeration |
getMapNames()
Returns an Enumeration of all the names in the
MapMessage object. |
java.lang.Object |
getObject(java.lang.String name)
Returns the value of the object with the specified name. |
short |
getShort(java.lang.String name)
Returns the short value with the specified name. |
java.lang.String |
getString(java.lang.String name)
Returns the String value with the specified name. |
boolean |
itemExists(java.lang.String name)
Indicates whether an item exists in this MapMessage
object. |
void |
setBoolean(java.lang.String name,
boolean value)
Sets a boolean value with the specified name into the
Map. |
void |
setByte(java.lang.String name,
byte value)
Sets a byte value with the specified name into the Map. |
void |
setBytes(java.lang.String name,
byte[] value)
Sets a byte array value with the specified name into the Map. |
void |
setBytes(java.lang.String name,
byte[] value,
int offset,
int length)
Sets a portion of the byte array value with the specified name into the Map. |
void |
setChar(java.lang.String name,
char value)
Sets a Unicode character value with the specified name into the Map. |
void |
setDouble(java.lang.String name,
double value)
Sets a double value with the specified name into the Map. |
void |
setFloat(java.lang.String name,
float value)
Sets a float value with the specified name into the Map. |
void |
setInt(java.lang.String name,
int value)
Sets an int value with the specified name into the Map. |
void |
setLong(java.lang.String name,
long value)
Sets a long value with the specified name into the Map. |
void |
setObject(java.lang.String name,
java.lang.Object value)
Sets an object value with the specified name into the Map. |
void |
setShort(java.lang.String name,
short value)
Sets a short value with the specified name into the Map. |
void |
setString(java.lang.String name,
java.lang.String value)
Sets a String value with the specified name into the Map. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.jms.Message |
acknowledge, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty |
| Constructor Detail |
public MapMessageImpl()
| Method Detail |
public boolean getBoolean(java.lang.String name)
throws javax.jms.JMSException
boolean value with the specified name.
getBoolean in interface javax.jms.MapMessagename - the name of the boolean
boolean value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getBoolean(String)
public byte getByte(java.lang.String name)
throws javax.jms.JMSException
byte value with the specified name.
getByte in interface javax.jms.MapMessagename - the name of the byte
byte value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getByte(String)
public short getShort(java.lang.String name)
throws javax.jms.JMSException
short value with the specified name.
getShort in interface javax.jms.MapMessagename - the name of the short
short value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getShort(String)
public char getChar(java.lang.String name)
throws javax.jms.JMSException
getChar in interface javax.jms.MapMessagename - the name of the Unicode character
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getChar(String)
public int getInt(java.lang.String name)
throws javax.jms.JMSException
int value with the specified name.
getInt in interface javax.jms.MapMessagename - the name of the int
int value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getInt(String)
public long getLong(java.lang.String name)
throws javax.jms.JMSException
long value with the specified name.
getLong in interface javax.jms.MapMessagename - the name of the long
long value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getLong(String)
public float getFloat(java.lang.String name)
throws javax.jms.JMSException
float value with the specified name.
getFloat in interface javax.jms.MapMessagename - the name of the float
float value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getFloat(String)
public double getDouble(java.lang.String name)
throws javax.jms.JMSException
double value with the specified name.
getDouble in interface javax.jms.MapMessagename - the name of the double
double value with the specified name
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getDouble(String)
public java.lang.String getString(java.lang.String name)
throws javax.jms.JMSException
String value with the specified name.
getString in interface javax.jms.MapMessagename - the name of the String
String value with the specified name; if
there is no item by this name, a null value is returned
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getString(String)
public byte[] getBytes(java.lang.String name)
throws javax.jms.JMSException
getBytes in interface javax.jms.MapMessagename - the name of the byte array
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.
javax.jms.MessageFormatException - if this type conversion is invalid.MapMessage.getBytes(String)
public java.lang.Object getObject(java.lang.String name)
throws javax.jms.JMSException
This method can be used to return, in objectified format, an object in
the Java programming language ("Java object") that had been stored in
the Map with the equivalent setObject method call, or its
equivalent primitive set type method.
Note that byte values are returned as byte[], not
Byte[].
getObject in interface javax.jms.MapMessagename - the name of the Java object
int, an Integer is returned); if
there is no item by this name, a null value is returned
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.MapMessage.getObject(String)
public java.util.Enumeration getMapNames()
throws javax.jms.JMSException
Enumeration of all the names in the
MapMessage object.
getMapNames in interface javax.jms.MapMessageMapMessage
javax.jms.JMSException - if the JMS provider fails to read the message due to some
internal error.MapMessage.getMapNames()
public void setBoolean(java.lang.String name,
boolean value)
throws javax.jms.JMSException
boolean value with the specified name into the
Map.
setBoolean in interface javax.jms.MapMessagename - the name of the booleanvalue - the boolean value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setBoolean(String, boolean)
public void setByte(java.lang.String name,
byte value)
throws javax.jms.JMSException
byte value with the specified name into the Map.
setByte in interface javax.jms.MapMessagename - the name of the bytevalue - the byte value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setByte(String, byte)
public void setShort(java.lang.String name,
short value)
throws javax.jms.JMSException
short value with the specified name into the Map.
setShort in interface javax.jms.MapMessagename - the name of the shortvalue - the short value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setShort(String, short)
public void setChar(java.lang.String name,
char value)
throws javax.jms.JMSException
setChar in interface javax.jms.MapMessagename - the name of the Unicode charactervalue - the Unicode character value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setChar(String, char)
public void setInt(java.lang.String name,
int value)
throws javax.jms.JMSException
int value with the specified name into the Map.
setInt in interface javax.jms.MapMessagename - the name of the intvalue - the int value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setInt(String, int)
public void setLong(java.lang.String name,
long value)
throws javax.jms.JMSException
long value with the specified name into the Map.
setLong in interface javax.jms.MapMessagename - the name of the longvalue - the long value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setLong(String, long)
public void setFloat(java.lang.String name,
float value)
throws javax.jms.JMSException
float value with the specified name into the Map.
setFloat in interface javax.jms.MapMessagename - the name of the floatvalue - the float value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setFloat(String, float)
public void setDouble(java.lang.String name,
double value)
throws javax.jms.JMSException
double value with the specified name into the Map.
setDouble in interface javax.jms.MapMessagename - the name of the doublevalue - the double value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setDouble(String, double)
public void setString(java.lang.String name,
java.lang.String value)
throws javax.jms.JMSException
String value with the specified name into the Map.
setString in interface javax.jms.MapMessagename - the name of the Stringvalue - the String value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setString(String, String)
public void setBytes(java.lang.String name,
byte[] value)
throws javax.jms.JMSException
setBytes in interface javax.jms.MapMessagename - the name of the byte arrayvalue - the byte array value to set in the Map; the array is copied
so that the value for name will not be altered
by future modifications
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setBytes(String, byte[])
public void setBytes(java.lang.String name,
byte[] value,
int offset,
int length)
throws javax.jms.JMSException
setBytes in interface javax.jms.MapMessagename - the name of the byte arrayvalue - the byte array value to set in the Mapoffset - the initial offset within the byte arraylength - the number of bytes to use
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setBytes(String, byte[], int, int)
public void setObject(java.lang.String name,
java.lang.Object value)
throws javax.jms.JMSException
This method works only for the objectified primitive object types (
Integer,Double,Long
...), String objects, and byte arrays.
setObject in interface javax.jms.MapMessagename - the name of the Java objectvalue - the Java object value to set in the Map
javax.jms.JMSException - if the JMS provider fails to write the message due to
some internal error.
javax.jms.MessageFormatException - if the object is invalid.
javax.jms.MessageNotWriteableException - if the message is in read-only mode.MapMessage.setObject(String, Object)
public boolean itemExists(java.lang.String name)
throws javax.jms.JMSException
MapMessage
object.
itemExists in interface javax.jms.MapMessagename - the name of the item to test
javax.jms.JMSException - if the JMS provider fails to determine if the item exists
due to some internal error.MapMessage.itemExists(String)
public void clearBody()
throws javax.jms.JMSException
clearBody in interface javax.jms.MessageclearBody in class MessageImpljavax.jms.JMSException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||