| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.j_spaces.core.client.MetaDataEntry
com.j_spaces.jms.GSMessageImpl
com.j_spaces.jms.GSMapMessageImpl
public class GSMapMessageImpl
A MapMassage implementation for the GigaSpaces JMS API wrapping.
| Field Summary | 
|---|
| Fields inherited from interface javax.jms.Message | 
|---|
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE | 
| Constructor Summary | |
|---|---|
GSMapMessageImpl()
Instantiates a new MapMessage. | 
|
GSMapMessageImpl(GSSessionImpl session)
Instantiates a new MapMessage. | 
|
GSMapMessageImpl(GSSessionImpl session,
                 HashMap<String,Object> map)
Instantiates a new MapMessage. | 
|
| Method Summary | |
|---|---|
 void | 
clearBody()
API method.  | 
 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 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 | 
 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 Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and byte arrays.  | 
 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  | 
| Methods inherited from class com.j_spaces.core.client.MetaDataEntry | 
|---|
__getEntryInfo, __setEntryInfo, isFifo, isNOWriteLeaseMode, isTransient, makePersistent, makeTransient, setFifo, setNOWriteLeaseMode | 
| Methods inherited from class java.lang.Object | 
|---|
getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public GSMapMessageImpl()
                 throws JMSException
MapMessage.
JMSException - if falied to create the message
public GSMapMessageImpl(GSSessionImpl session,
                        HashMap<String,Object> map)
                 throws 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 message
JMSException - if falied to create the message
public GSMapMessageImpl(GSSessionImpl session)
                 throws 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 message
JMSException - if falied to create the message| Method Detail | 
|---|
public void setMap(HashMap<String,Object> map)
map - the mappublic HashMap<String,Object> getMap()
public final boolean getBoolean(String name)
                         throws JMSException,
                                MessageFormatException
getBoolean in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getBoolean(java.lang.String)
public final byte getByte(String name)
                   throws JMSException,
                          MessageFormatException
getByte in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getByte(java.lang.String)
public final short getShort(String name)
                     throws JMSException,
                            MessageFormatException
getShort in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getShort(java.lang.String)
public final char getChar(String name)
                   throws JMSException,
                          MessageFormatException
getChar in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getChar(java.lang.String)
public final int getInt(String name)
                 throws JMSException,
                        MessageFormatException
getInt in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getInt(java.lang.String)
public final long getLong(String name)
                   throws JMSException,
                          MessageFormatException
getLong in interface MapMessageJMSException
MessageFormatExceptionjavax.jms#getLong(java.lang.String)
public final float getFloat(String name)
                     throws JMSException,
                            MessageFormatException
getFloat in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getFloat(java.lang.String)
public final double getDouble(String name)
                       throws JMSException,
                              MessageFormatException
getDouble in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getDouble(java.lang.String)
public final String getString(String name)
                       throws JMSException,
                              MessageFormatException
getString in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getString(java.lang.String)
public final byte[] getBytes(String name)
                      throws JMSException,
                             MessageFormatException
getBytes in interface MapMessageJMSException
MessageFormatExceptionMapMessage.getBytes(java.lang.String)
public final Object getObject(String name)
                       throws 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 MapMessage
name - the name of the Java object
JMSException - if JMS fails to read the message due to some
 internal JMS error
public Enumeration getMapNames()
                        throws JMSException
getMapNames in interface MapMessageJMSExceptionMapMessage.getMapNames()
public final void setBoolean(String name,
                             boolean value)
                      throws JMSException
setBoolean in interface MapMessagename - the name of the booleanvalue - the boolean value to set in the Map
JMSException - if the message is in read-only mode
public final void setByte(String name,
                          byte value)
                   throws JMSException
setByte in interface MapMessagename - the name of the bytevalue - the byte value to set in the Map
JMSException - if the message is in read-only mode
public final void setShort(String name,
                           short value)
                    throws JMSException
setShort in interface MapMessagename - the name of the shortvalue - the short value to set in the Map
JMSException - if the message is in read-only mode
public final void setChar(String name,
                          char value)
                   throws JMSException
setChar in interface MapMessagename - the name of the Unicode charactervalue - the Unicode character value to set in the Map
JMSException - if the message is in read-only mode
public final void setInt(String name,
                         int value)
                  throws JMSException
setInt in interface MapMessagename - the name of the integervalue - the integer value to set in the Map
JMSException - if the message is in read-only mode
public final void setLong(String name,
                          long value)
                   throws JMSException
setLong in interface MapMessagename - the name of the longvalue - the long value to set in the Map
JMSException - if the message is in read-only mode
public final void setFloat(String name,
                           float value)
                    throws JMSException
setFloat in interface MapMessagename - the name of the floatvalue - the float value to set in the Map
JMSException - if the message is in read-only mode
public final void setDouble(String name,
                            double value)
                     throws JMSException
setDouble in interface MapMessagename - the name of the doublevalue - the double value to set in the Map
JMSException - if the message is in read-only mode
public final void setString(String name,
                            String value)
                     throws JMSException
setString in interface MapMessagename - the name of the Stringvalue - the String value to set in the Map
JMSException - if the message is in read-only mode
public final void setBytes(String name,
                           byte[] value)
                    throws JMSException
setBytes in interface 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.
JMSException - if the message is in read-only mode
public final void setBytes(String name,
                           byte[] value,
                           int offset,
                           int length)
                    throws JMSException
setBytes in interface 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.
JMSException - if the message is in read-only mode
public final void setObject(String name,
                            Object value)
                     throws JMSException
Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and byte arrays.
setObject in interface MapMessagename - the name of the Java objectvalue - the Java object value to set in the Map
MessageFormatException - if object is invalid
JMSException - if message in read-only mode.
public boolean itemExists(String name)
                   throws JMSException
itemExists in interface MapMessagename - the name of the item to test
JMSException
public void clearBody()
               throws JMSException
clearBody in interface MessageclearBody in class GSMessageImplJMSException - Actually never thrown.Message.clearBody()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||