| 
|||||||||
| 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.GSObjectMessageImpl
public class GSObjectMessageImpl
Implements the javax.jms.ObjectMessage interface for 
 the GigaSpaces JMS API.
 An ObjectMessage object is used to send a message that contains
 a serializable object in the Java programming language ("Java object").
 It inherits from the Message interface and adds a body
 containing a single reference to an object. 
 Only Serializable Java objects can be used.
 
If a collection of Java objects must be sent, one of the 
 Collection classes provided since JDK 1.2 can be used.
 
When a client receives an ObjectMessage, it is in read-only 
 mode. 
 If a client attempts to write to the message at this point, a 
 MessageNotWriteableException is thrown. If 
 clearBody is called, the message can now be both read from and 
 written to.
Session.createObjectMessage(), 
Session.createObjectMessage(Serializable), 
Message, 
Serialized Form| Field Summary | 
|---|
| Fields inherited from interface javax.jms.Message | 
|---|
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE | 
| Constructor Summary | |
|---|---|
GSObjectMessageImpl()
Instantiates a new GSObjectMessageImpl. | 
|
GSObjectMessageImpl(GSSessionImpl session)
Instantiates a new GSObjectMessageImpl. | 
|
GSObjectMessageImpl(GSSessionImpl session,
                    Serializable objBody)
Instantiates a new GSObjectMessageImpl. | 
|
| Method Summary | |
|---|---|
 Serializable | 
getObject()
Get the serializable object containing this message's data.  | 
 void | 
readBody(DataInput dataIn)
Used to help build the body from an input stream  | 
 void | 
setObject(Serializable obj)
Set the serializable object containing this message's data.  | 
 void | 
writeBody(DataOutput dataOut)
Used serialize the message body to an output stream  | 
| 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 GSObjectMessageImpl()
                    throws JMSException
GSObjectMessageImpl.
JMSException - if falied to create the message
public GSObjectMessageImpl(GSSessionImpl session,
                           Serializable objBody)
                    throws JMSException
GSObjectMessageImpl.
session - the session of the messageobjBody - the object content of the message
JMSException - if falied to create the message
public GSObjectMessageImpl(GSSessionImpl session)
                    throws JMSException
GSObjectMessageImpl.
session - the session of the message
JMSException - if falied to create the message| Method Detail | 
|---|
public final void setObject(Serializable obj)
                     throws JMSException
ObjectMessage
 contains a snapshot of the object at the time setObject()
 is called - subsequent modifications of the object will have no
 affect on the ObjectMessage body.
setObject in interface ObjectMessageobj - the message's data
MessageFormatException - if object serialization fails
MessageNotWriteableException - if the message is read-only
JMSException
public final Serializable getObject()
                             throws MessageFormatException
getObject in interface ObjectMessageMessageFormatException - if object deserialization fails
public void writeBody(DataOutput dataOut)
               throws IOException
dataOut - 
IOException
public void readBody(DataInput dataIn)
              throws IOException
dataIn - 
IOException
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||