Sun Java System Message Queue 4.2 Developer's Guide for Java Clients

Processing Object Messages

The ObjectMessage interface provides just one method, getObject (Table 2–23 ), for retrieving the serialized object that is the body of an object message:

Object  messageBody = inMsg.getObject();

You can then typecast the result to a more specific class and process it in whatever way is appropriate.

Table 2–23 Object Message Access Method

Name 

Description 

getObject

Get serialized object from message body