public class GSMapMessageImpl extends GSMessageImpl implements javax.jms.MapMessage
Body, BODY_STR_NAME, BYTES, DestinationName, indexedFields, JMS_CORRELATION_ID, JMS_DELIVERY_MODE, JMS_DESTINATION, JMS_EXPIRATION, JMS_GSCONNECTION_KEY_NAME, JMS_GSCONVERTER, JMS_GSPRODUCER_KEY_PROP_NAME, JMS_GSTTL_KEY_PROP_NAME, JMS_MESSAGE_ID, JMS_PRIORITY, JMS_REDELIVERED, JMS_REPLY_TO, JMS_TIMESTAMP, JMS_TYPE, JMSCorrelationID, JMSDeliveryMode, JMSDestination, JMSExpiration, JMSMessageID, JMSPriority, JMSRedelivered, JMSReplyTo, JMSTimestamp, JMSType, JMSX_GROUPID, JMSX_GROUPSEQ, JMSX_USERID, MAP, OBJECT, Properties, PROPERTIES_STR_NAME, session, SIMPLE, STREAM, TEXT| Constructor and Description |
|---|
GSMapMessageImpl()
Instantiates a new
MapMessage. |
GSMapMessageImpl(GSSessionImpl session)
Instantiates a new
MapMessage. |
GSMapMessageImpl(GSSessionImpl session,
HashMap<String,Object> map)
Instantiates a new
MapMessage. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBody()
API method.
|
protected Object |
cloneBody()
Returns a clone of the body.
|
boolean |
getBoolean(String name) |
byte |
getByte(String name) |
byte[] |
getBytes(String name) |
char |
getChar(String name) |
double |
getDouble(String name) |
float |
getFloat(String name) |
int |
getInt(String name) |
long |
getLong(String name) |
HashMap<String,Object> |
getMap()
Returns the object's map.
|
Enumeration |
getMapNames()
Return an Enumeration of all the Map message's names.
|
Object |
getObject(String name)
Return the Java object value with the given name
|
short |
getShort(String name) |
String |
getString(String name) |
boolean |
itemExists(String name)
Check if an item exists in this MapMessage
|
void |
setBoolean(String name,
boolean value)
Set a boolean value with the given name, into the Map
|
void |
setByte(String name,
byte value)
Set a byte value with the given name, into the Map
|
void |
setBytes(String name,
byte[] value)
Set a byte array value with the given name, into the Map
|
void |
setBytes(String name,
byte[] value,
int offset,
int length)
Set a portion of the byte array value with the given name, into the Map
|
void |
setChar(String name,
char value)
Set a Unicode character value with the given name, into the Map
|
void |
setDouble(String name,
double value)
Set a double value with the given name, into the Map
|
void |
setFloat(String name,
float value)
Set a float value with the given name, into the Map
|
void |
setInt(String name,
int value)
Set an integer value with the given name, into the Map
|
void |
setLong(String name,
long value)
Set a long value with the given name, into the Map
|
void |
setMap(HashMap<String,Object> map)
Sets the object's map.
|
void |
setObject(String name,
Object value)
Set a Java object value with the given name, into the Map
|
void |
setShort(String name,
short value)
Set a short value with the given name, into the Map
|
void |
setString(String name,
String value)
Set a String value with the given name, into the Map
|
__getSpaceIndexedFields, acknowledge, checkBodyReadOnly, checkBodyWriteOnly, checkPropertiesReadOnly, clearProperties, cloneObject, copyTo, equals, getBooleanProperty, getByteProperty, getDestinationName, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, propertyExists, readExternal, setBooleanProperty, setByteProperty, setDestinationName, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setProperties, setRoutingIndexes, setShortProperty, setStringProperty, toString, writeExternal__getEntryInfo, __setEntryInfo, _readExternal, _writeExternal, isFifo, isNOWriteLeaseMode, isTransient, makePersistent, makeTransient, setFifo, setNOWriteLeaseMode, setTransientclone, finalize, getClass, notify, notifyAll, wait, wait, waitacknowledge, 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, setStringPropertypublic GSMapMessageImpl()
throws javax.jms.JMSException
MapMessage.javax.jms.JMSException - if falied to create the messagepublic GSMapMessageImpl(GSSessionImpl session, HashMap<String,Object> map) throws javax.jms.JMSException
MapMessage. It's important to note that map should contain
only values that are valid according to the JMS specification.session - the session of the messagemap - the map content of the messagejavax.jms.JMSException - if falied to create the messagepublic GSMapMessageImpl(GSSessionImpl session) throws javax.jms.JMSException
MapMessage. It's important to note that map should contain
only values that are valid according to the JMS specification.session - the session of the messagejavax.jms.JMSException - if falied to create the messagepublic void setMap(HashMap<String,Object> map)
map - the mappublic final boolean getBoolean(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getBoolean in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getBoolean(String)public final byte getByte(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getByte in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getByte(String)public final short getShort(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getShort in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getShort(String)public final char getChar(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getChar in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getChar(String)public final int getInt(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getInt in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getInt(String)public final long getLong(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getLong in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getLong(String)public final float getFloat(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getFloat in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getFloat(String)public final double getDouble(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getDouble in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getDouble(String)public final String getString(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getString in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getString(String)public final byte[] getBytes(String name) throws javax.jms.JMSException, javax.jms.MessageFormatException
getBytes in interface javax.jms.MapMessagejavax.jms.JMSExceptionjavax.jms.MessageFormatExceptionMapMessage.getBytes(String)public final Object getObject(String name) throws javax.jms.JMSException
Note that this method can be used to
return in objectified format, an object that had been stored in the Map with the equivalent
setObject method call, or it's equivalent primitive set
getObject in interface javax.jms.MapMessagename - the name of the Java objectjavax.jms.JMSException - if JMS fails to read the message due to some internal JMS errorpublic Enumeration getMapNames() throws javax.jms.JMSException
getMapNames in interface javax.jms.MapMessagejavax.jms.JMSExceptionMapMessage.getMapNames()public final void setBoolean(String name, boolean value) throws javax.jms.JMSException
setBoolean in interface javax.jms.MapMessagename - the name of the booleanvalue - the boolean value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setByte(String name, byte value) throws javax.jms.JMSException
setByte in interface javax.jms.MapMessagename - the name of the bytevalue - the byte value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setShort(String name, short value) throws javax.jms.JMSException
setShort in interface javax.jms.MapMessagename - the name of the shortvalue - the short value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setChar(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 Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setInt(String name, int value) throws javax.jms.JMSException
setInt in interface javax.jms.MapMessagename - the name of the integervalue - the integer value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setLong(String name, long value) throws javax.jms.JMSException
setLong in interface javax.jms.MapMessagename - the name of the longvalue - the long value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setFloat(String name, float value) throws javax.jms.JMSException
setFloat in interface javax.jms.MapMessagename - the name of the floatvalue - the float value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setDouble(String name, double value) throws javax.jms.JMSException
setDouble in interface javax.jms.MapMessagename - the name of the doublevalue - the double value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setString(String name, String value) throws javax.jms.JMSException
setString in interface javax.jms.MapMessagename - the name of the Stringvalue - the String value to set in the Mapjavax.jms.JMSException - if the message is in read-only modepublic final void setBytes(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 the value for
name will not be altered by future modifications.javax.jms.JMSException - if the message is in read-only modepublic final void setBytes(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 Map.offset - the initial offset within the byte array.length - the number of bytes to use.javax.jms.JMSException - if the message is in read-only modepublic final void setObject(String name, Object value) throws javax.jms.JMSException
Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and byte arrays.
setObject in interface javax.jms.MapMessagename - the name of the Java objectvalue - the Java object value to set in the Mapjavax.jms.MessageFormatException - if object is invalidjavax.jms.JMSException - if message in read-only mode.public boolean itemExists(String name) throws javax.jms.JMSException
itemExists in interface javax.jms.MapMessagename - the name of the item to testjavax.jms.JMSExceptionpublic void clearBody()
throws javax.jms.JMSException
clearBody in interface javax.jms.MessageclearBody in class GSMessageImpljavax.jms.JMSException - Actually never thrown.Message.clearBody()protected Object cloneBody()
cloneBody in class GSMessageImplCopyright © GigaSpaces.