|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mq.SpyMessage (src) org.jboss.mq.SpyMapMessage
This class implements javax.jms.MapMessage
Nested Class Summary |
Nested classes inherited from class org.jboss.mq.SpyMessage (src) |
SpyMessage.Header (src) |
Field Summary |
Fields inherited from class org.jboss.mq.SpyMessage (src) |
ack, BOOLEAN, BYTE, BYTES_MESS, DOUBLE, ENCAP_MESS, FLOAT, header, INT, LONG, MAP_MESS, NULL, OBJECT, OBJECT_MESS, PROPERTY_REDELIVERY_COUNT, PROPERTY_REDELIVERY_DELAY, PROPERTY_REDELIVERY_LIMIT, PROPERTY_SCHEDULED_DELIVERY, session, SHORT, SPY_MESS, STREAM_MESS, STRING, TEXT_MESS |
Fields inherited from interface javax.jms.Message (src) |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Constructor Summary | |
SpyMapMessage()
Create a new SpyMapMessage |
Method Summary | |
void |
clearBody()
Clears 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. |
SpyMessage (src) |
myClone()
Clone the message |
void |
readExternal(java.io.ObjectInput in)
|
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. |
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SpyMapMessage()
Method Detail |
public void setBoolean(java.lang.String name, boolean value) throws JMSException (src)
MapMessage (src)
boolean
value with the specified name into the Map.
setBoolean
in interface MapMessage (src)
name
- the name of the boolean
value
- the boolean
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setByte(java.lang.String name, byte value) throws JMSException (src)
MapMessage (src)
byte
value with the specified name into the Map.
setByte
in interface MapMessage (src)
name
- the name of the byte
value
- the byte
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setShort(java.lang.String name, short value) throws JMSException (src)
MapMessage (src)
short
value with the specified name into the Map.
setShort
in interface MapMessage (src)
name
- the name of the short
value
- the short
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setChar(java.lang.String name, char value) throws JMSException (src)
MapMessage (src)
setChar
in interface MapMessage (src)
name
- the name of the Unicode charactervalue
- the Unicode character value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setInt(java.lang.String name, int value) throws JMSException (src)
MapMessage (src)
int
value with the specified name into the Map.
setInt
in interface MapMessage (src)
name
- the name of the int
value
- the int
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setLong(java.lang.String name, long value) throws JMSException (src)
MapMessage (src)
long
value with the specified name into the Map.
setLong
in interface MapMessage (src)
name
- the name of the long
value
- the long
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setFloat(java.lang.String name, float value) throws JMSException (src)
MapMessage (src)
float
value with the specified name into the Map.
setFloat
in interface MapMessage (src)
name
- the name of the float
value
- the float
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setDouble(java.lang.String name, double value) throws JMSException (src)
MapMessage (src)
double
value with the specified name into the Map.
setDouble
in interface MapMessage (src)
name
- the name of the double
value
- the double
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setString(java.lang.String name, java.lang.String value) throws JMSException (src)
MapMessage (src)
String
value with the specified name into the Map.
setString
in interface MapMessage (src)
name
- the name of the String
value
- the String
value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setBytes(java.lang.String name, byte[] value) throws JMSException (src)
MapMessage (src)
setBytes
in interface MapMessage (src)
name
- 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
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setBytes(java.lang.String name, byte[] value, int offset, int length) throws JMSException (src)
MapMessage (src)
setBytes
in interface MapMessage (src)
name
- 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
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public void setObject(java.lang.String name, java.lang.Object value) throws JMSException (src)
MapMessage (src)
This method works only for the objectified primitive
object types (Integer
, Double
,
Long
...), String
objects, and byte
arrays.
setObject
in interface MapMessage (src)
name
- the name of the Java objectvalue
- the Java object value to set in the Map
JMSException (src)
- if the JMS provider fails to write the message
due to some internal error.public boolean getBoolean(java.lang.String name) throws JMSException (src)
MapMessage (src)
boolean
value with the specified name.
getBoolean
in interface MapMessage (src)
name
- the name of the boolean
boolean
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public byte getByte(java.lang.String name) throws JMSException (src)
MapMessage (src)
byte
value with the specified name.
getByte
in interface MapMessage (src)
name
- the name of the byte
byte
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public short getShort(java.lang.String name) throws JMSException (src)
MapMessage (src)
short
value with the specified name.
getShort
in interface MapMessage (src)
name
- the name of the short
short
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public char getChar(java.lang.String name) throws JMSException (src)
MapMessage (src)
getChar
in interface MapMessage (src)
name
- the name of the Unicode character
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public int getInt(java.lang.String name) throws JMSException (src)
MapMessage (src)
int
value with the specified name.
getInt
in interface MapMessage (src)
name
- the name of the int
int
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public long getLong(java.lang.String name) throws JMSException (src)
MapMessage (src)
long
value with the specified name.
getLong
in interface MapMessage (src)
name
- the name of the long
long
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public float getFloat(java.lang.String name) throws JMSException (src)
MapMessage (src)
float
value with the specified name.
getFloat
in interface MapMessage (src)
name
- the name of the float
float
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public double getDouble(java.lang.String name) throws JMSException (src)
MapMessage (src)
double
value with the specified name.
getDouble
in interface MapMessage (src)
name
- the name of the double
double
value with the specified name
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public java.lang.String getString(java.lang.String name) throws JMSException (src)
MapMessage (src)
String
value with the specified name.
getString
in interface MapMessage (src)
name
- the name of the String
String
value with the specified name; if there
is no item by this name, a null value is returned
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public byte[] getBytes(java.lang.String name) throws JMSException (src)
MapMessage (src)
getBytes
in interface MapMessage (src)
name
- the name of the byte array
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public java.lang.Object getObject(java.lang.String name) throws JMSException (src)
MapMessage (src)
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
settype
method.
Note that byte values are returned as byte[]
, not
Byte[]
.
getObject
in interface MapMessage (src)
name
- the name of the Java object
int
, an Integer
is returned); if there is no
item by this name, a null value is returned
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public java.util.Enumeration getMapNames() throws JMSException (src)
MapMessage (src)
Enumeration
of all the names in the
MapMessage
object.
getMapNames
in interface MapMessage (src)
MapMessage
JMSException (src)
- if the JMS provider fails to read the message
due to some internal error.public boolean itemExists(java.lang.String name) throws JMSException (src)
MapMessage (src)
MapMessage
object.
itemExists
in interface MapMessage (src)
name
- the name of the item to test
JMSException (src)
- if the JMS provider fails to determine if the
item exists due to some internal error.public void clearBody() throws JMSException (src)
Message (src)
If this message body was read-only, calling this method leaves the message body in the same state as an empty body in a newly created message.
clearBody
in interface Message (src)
clearBody
in class SpyMessage (src)
JMSException (src)
- for any errorpublic SpyMessage (src) myClone() throws JMSException (src)
SpyMessage (src)
myClone
in class SpyMessage (src)
JMSException (src)
- for any errorpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class SpyMessage (src)
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class SpyMessage (src)
java.io.IOException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |