Class ActiveMQObjectMessage
- java.lang.Object
-
- org.apache.activemq.artemis.jms.client.ActiveMQMessage
-
- org.apache.activemq.artemis.jms.client.ActiveMQObjectMessage
-
- All Implemented Interfaces:
javax.jms.Message
,javax.jms.ObjectMessage
- Direct Known Subclasses:
ActiveMQObjectCompatibleMessage
public class ActiveMQObjectMessage extends ActiveMQMessage implements javax.jms.ObjectMessage
ActiveMQ Artemis implementation of a JMS ObjectMessage.
Don't used ObjectMessage if you want good performance!Serialization is slooooow!
-
-
Field Summary
Fields Modifier and Type Field Description static byte
TYPE
-
Fields inherited from class org.apache.activemq.artemis.jms.client.ActiveMQMessage
message, OLD_QUEUE_QUALIFIED_PREFIX, OLD_TEMP_QUEUE_QUALIFED_PREFIX, OLD_TEMP_TOPIC_QUALIFED_PREFIX, OLD_TOPIC_QUALIFIED_PREFIX, propertiesReadOnly, readOnly, replyTo
-
-
Constructor Summary
Constructors Modifier Constructor Description ActiveMQObjectMessage(javax.jms.ObjectMessage foreign, ClientSession session, ConnectionFactoryOptions options)
A copy constructor for foreign JMS ObjectMessages.protected
ActiveMQObjectMessage(ClientMessage message, ClientSession session, ConnectionFactoryOptions options)
protected
ActiveMQObjectMessage(ClientSession session, ConnectionFactoryOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearBody()
void
doBeforeReceive()
void
doBeforeSend()
protected <T> T
getBodyInternal(java.lang.Class<T> c)
java.io.Serializable
getObject()
byte
getType()
boolean
isBodyAssignableTo(java.lang.Class c)
void
setObject(java.io.Serializable object)
-
Methods inherited from class org.apache.activemq.artemis.jms.client.ActiveMQMessage
acknowledge, checkBuffer, checkPrefix, checkPrefixStr, checkRead, checkWrite, clearProperties, coreCompositeTypeToJMSCompositeType, coreMaptoJMSMap, createMessage, createMessage, getBody, getBooleanProperty, getByteProperty, getCoreMessage, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hasNoBody, prefixOf, propertyExists, resetMessageID, saveToOutputStream, setBooleanProperty, setByteProperty, setClientAcknowledge, setDoubleProperty, setFloatProperty, setIndividualAcknowledge, setInputStream, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setOutputStream, setShortProperty, setStringProperty, toString, waitCompletionOnStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Message
acknowledge, clearProperties, getBody, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
-
-
-
-
Field Detail
-
TYPE
public static final byte TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ActiveMQObjectMessage
protected ActiveMQObjectMessage(ClientSession session, ConnectionFactoryOptions options)
-
ActiveMQObjectMessage
protected ActiveMQObjectMessage(ClientMessage message, ClientSession session, ConnectionFactoryOptions options)
-
ActiveMQObjectMessage
public ActiveMQObjectMessage(javax.jms.ObjectMessage foreign, ClientSession session, ConnectionFactoryOptions options) throws javax.jms.JMSException
A copy constructor for foreign JMS ObjectMessages.- Throws:
javax.jms.JMSException
-
-
Method Detail
-
getType
public byte getType()
- Overrides:
getType
in classActiveMQMessage
-
doBeforeSend
public void doBeforeSend() throws java.lang.Exception
- Overrides:
doBeforeSend
in classActiveMQMessage
- Throws:
java.lang.Exception
-
doBeforeReceive
public void doBeforeReceive() throws org.apache.activemq.artemis.api.core.ActiveMQException
- Overrides:
doBeforeReceive
in classActiveMQMessage
- Throws:
org.apache.activemq.artemis.api.core.ActiveMQException
-
setObject
public void setObject(java.io.Serializable object) throws javax.jms.JMSException
- Specified by:
setObject
in interfacejavax.jms.ObjectMessage
- Throws:
javax.jms.JMSException
-
getObject
public java.io.Serializable getObject() throws javax.jms.JMSException
- Specified by:
getObject
in interfacejavax.jms.ObjectMessage
- Throws:
javax.jms.JMSException
-
clearBody
public void clearBody() throws javax.jms.JMSException
- Specified by:
clearBody
in interfacejavax.jms.Message
- Overrides:
clearBody
in classActiveMQMessage
- Throws:
javax.jms.JMSException
-
getBodyInternal
protected <T> T getBodyInternal(java.lang.Class<T> c) throws javax.jms.MessageFormatException
- Overrides:
getBodyInternal
in classActiveMQMessage
- Throws:
javax.jms.MessageFormatException
-
isBodyAssignableTo
public boolean isBodyAssignableTo(java.lang.Class c)
- Specified by:
isBodyAssignableTo
in interfacejavax.jms.Message
- Overrides:
isBodyAssignableTo
in classActiveMQMessage
-
-