1 7 package org.jboss.jms; 8 9 import javax.jms.JMSException ; 10 import javax.jms.ObjectMessage ; 11 import java.io.Serializable ; 12 13 17 public class ObjectMessageImpl extends MessageImpl implements ObjectMessage 18 { 19 20 ObjectMessageImpl() 21 { 22 super.type = MessageImpl.OBJECT_MESSAGE_NAME; 23 } 24 25 public ObjectMessageImpl(Serializable object) 26 { 27 super.type = MessageImpl.OBJECT_MESSAGE_NAME; 28 super.body = object; 29 } 30 31 public Serializable getObject() throws JMSException 32 { 33 return (Serializable ) super.body; 34 } 35 36 public void setObject(Serializable object) throws JMSException 37 { 38 super.throwExceptionIfReadOnly(); 39 super.body = object; 40 } 41 42 } | Popular Tags |