|
Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) B14291-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jms.AQjmsMessage
oracle.jms.AQjmsMapMessage
This is an Oracle class which implements javax.jms.MapMessage
.
Field Summary |
Fields inherited from interface javax.jms.Message |
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Method Summary | |
void |
clearBody() Clears out the message body. |
void |
clearProperties() Clears a message's properties. |
boolean |
getBoolean(java.lang.String name) Returns, as a boolean , the value to which the specified name is mapped. |
byte |
getByte(java.lang.String name) Returns, as a byte , the value to which the specified name is mapped. |
byte[] |
getBytes(java.lang.String name) Returns the byte[] value to which the specified name is mapped. |
char |
getChar(java.lang.String name) Returns the Unicode character value to which the specified name is mapped. |
double |
getDouble(java.lang.String name) Returns, as a double , the value to which the specified name is mapped. |
float |
getFloat(java.lang.String name) Returns, as a float , the value to which the specified name is mapped. |
int |
getInt(java.lang.String name) Returns, as an int , the value to which the specified name is mapped. |
long |
getLong(java.lang.String name) Returns, as a long , the value to which the specified name is mapped. |
java.util.Enumeration |
getMapNames() Returns an Enumeration of all mapped names. |
java.lang.Object |
getObject(java.lang.String name) Returns, as a Java object, the value to which the specified name is mapped. |
short |
getShort(java.lang.String name) Returns, as a short , the value to which the specified name is mapped. |
java.lang.String |
getString(java.lang.String name) Returns, as a String , the value to which the specified name is mapped. |
boolean |
itemExists(java.lang.String name) Checks if a mapping exists for the specified name (i.e., if name maps to some item). |
void |
setBoolean(java.lang.String name, boolean value) Maps the specified name to the specified boolean value . |
void |
setByte(java.lang.String name, byte value) Maps the specified name to the specified byte value . |
void |
setBytes(java.lang.String name, byte[] value) Maps the specified name to the specified byte array value . |
void |
setBytes(java.lang.String name, byte[] value, int offset, int length) Maps the specified name to the specified portion of a byte array. |
void |
setChar(java.lang.String name, char value) Maps the specified name to the specified Unicode character value . |
void |
setDouble(java.lang.String name, double value) Maps the specified name to the specified double value . |
void |
setFloat(java.lang.String name, float value) Maps the specified name to the specified float value . |
void |
setInt(java.lang.String name, int value) Maps the specified name to the specified int value . |
void |
setLong(java.lang.String name, long value) Maps the specified name to the specified long value . |
void |
setObject(java.lang.String name, java.lang.Object value) Maps the specified name to the specified Java object value . |
void |
setShort(java.lang.String name, short value) Maps the specified name to the specified short value . |
void |
setString(java.lang.String name, java.lang.String value) Maps the specified name to the specified String value . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void clearProperties() throws JMSException
clearProperties
in interface Message
clearProperties
in class AQjmsMessage
JMSException
- if the message properties are not cleared due to some error.public void setBoolean(java.lang.String name, boolean value) throws JMSException
name
to the specified boolean
value
. The value can be retrieved by calling the getBoolean(java.lang.String)
method with a name that is equal to the original name.setBoolean
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setByte(java.lang.String name, byte value) throws JMSException
name
to the specified byte
value
. The value can be retrieved by calling the getByte(java.lang.String)
method with a name that is equal to the original name.setByte
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setShort(java.lang.String name, short value) throws JMSException
name
to the specified short
value
. The value can be retrieved by calling the getShort(java.lang.String)
method with a name that is equal to the original name.setShort
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setChar(java.lang.String name, char value) throws JMSException
name
to the specified Unicode character value
. The value can be retrieved by calling the getChar(java.lang.String)
method with a name that is equal to the original name.setChar
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setDouble(java.lang.String name, double value) throws JMSException
name
to the specified double
value
. The value can be retrieved by calling the getDouble(java.lang.String)
method with a name that is equal to the original name.setDouble
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setFloat(java.lang.String name, float value) throws JMSException
name
to the specified float
value
. The value can be retrieved by calling the getFloat(java.lang.String)
method with a name that is equal to the original name.setFloat
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setInt(java.lang.String name, int value) throws JMSException
name
to the specified int
value
. The value can be retrieved by calling the getInt(java.lang.String)
method with a name that is equal to the original name.setInt
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setLong(java.lang.String name, long value) throws JMSException
name
to the specified long
value
. The value can be retrieved by calling the getLong(java.lang.String)
method with a name that is equal to the original name.setLong
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setString(java.lang.String name, java.lang.String value) throws JMSException
name
to the specified String
value
. The value can be retrieved by calling the getString(java.lang.String)
method with a name that is equal to the original name.setString
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
(may be null
)JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setObject(java.lang.String name, java.lang.Object value) throws JMSException
name
to the specified Java object value
. The value can be retrieved by calling the getObject(java.lang.String)
method with a name that is equal to the original name. Note that the JMS specification does not explicitly define how a null
value
is to be treated, and different JMS implementations handle it differently. OJMS treats null
as an invalid value.setObject
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
- must be an objectified primitive (e.g., an Integer
), a String
, or a byte
arrayJMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageFormatException
- if value
is null
or is neither an objectified primitive, a String
, nor a byte
array.MessageNotWriteableException
- if this message is in read-only mode.public void setBytes(java.lang.String name, byte[] value) throws JMSException
name
to the specified byte
array value
. The value can be retrieved by calling the getBytes(java.lang.String)
method with a name that is equal to the original name.setBytes
in interface MapMessage
name
- the name to use as a keyvalue
- the value to associate with the specified name
JMSException
- if the name
/value
pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public void setBytes(java.lang.String name, byte[] value, int offset, int length) throws JMSException
name
to the specified portion of a byte
array. The resulting portion can be retrieved by calling the getBytes(java.lang.String)
method with a name that is equal to the original name.setBytes
in interface MapMessage
name
- the name to use as a keyvalue
- the source arrayoffset
- the initial offset within the source arraylength
- the number of bytes to use from the source arrayJMSException
- if the name
/portion pair is not mapped due to some error.java.lang.IllegalArgumentException
- if the name is null
or is an empty string.MessageNotWriteableException
- if this message is in read-only mode.public boolean getBoolean(java.lang.String name) throws JMSException
boolean
, the value to which the specified name
is mapped.getBoolean
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a boolean
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public byte getByte(java.lang.String name) throws JMSException
byte
, the value to which the specified name
is mapped.getByte
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a byte
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public byte[] getBytes(java.lang.String name) throws JMSException
byte[]
value to which the specified name
is mapped.getBytes
in interface MapMessage
name
- the name to use as a keybyte[]
value associated with name
, or null
if name
is not mapped to any valueJMSException
- if the value is not retrieved due to some error.MessageFormatException
- if name
is mapped to some value other than a byte[]
.public char getChar(java.lang.String name) throws JMSException
name
is mapped.getChar
in interface MapMessage
name
- the name to use as a keychar
value associated with name
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if name
is mapped to some value other than a char
.public double getDouble(java.lang.String name) throws JMSException
double
, the value to which the specified name
is mapped.getDouble
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a double
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public float getFloat(java.lang.String name) throws JMSException
float
, the value to which the specified name
is mapped.getFloat
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a float
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public int getInt(java.lang.String name) throws JMSException
int
, the value to which the specified name
is mapped.getInt
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to an int
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public long getLong(java.lang.String name) throws JMSException
long
, the value to which the specified name
is mapped.getLong
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a long
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public java.util.Enumeration getMapNames() throws JMSException
Enumeration
of all mapped names.getMapNames
in interface MapMessage
JMSException
- if the enumeration is not retrieved due to some error.public java.lang.Object getObject(java.lang.String name) throws JMSException
name
is mapped. Note that this method can be used to return, in objectified format, a value to which name
has been mapped with the setObject
method or the format's equivalent primitive set
type method.getObject
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to objectified format (e.g., int
is converted to Integer
), or null
if name
is not mapped to any valueJMSException
- if the value is not retrieved due to some error.public short getShort(java.lang.String name) throws JMSException
short
, the value to which the specified name
is mapped.getShort
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a short
JMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public java.lang.String getString(java.lang.String name) throws JMSException
String
, the value to which the specified name
is mapped.getString
in interface MapMessage
name
- the name to use as a keyname
, converted (if needed) to a String
, or null
if name
is not mapped to any valueJMSException
- if the value is not retrieved due to some error.MessageFormatException
- if the conversion is invalid.public boolean itemExists(java.lang.String name) throws JMSException
name
(i.e., if name
maps to some item). Note that this method will return true
even if the name is mapped to a null
value.itemExists
in interface MapMessage
name
- the name to use as a keytrue
iff a value is associated with the specified name
JMSException
- if the mapping's existence is not checked due to some error.public void clearBody() throws JMSException
clearBody
in interface Message
clearBody
in class AQjmsMessage
JMSException
- if the message body is not cleared due to some error.
|
Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) B14291-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |