Class ActiveMQBytesMessage
- java.lang.Object
-
- org.apache.activemq.artemis.jms.client.ActiveMQMessage
-
- org.apache.activemq.artemis.jms.client.ActiveMQBytesMessage
-
- All Implemented Interfaces:
javax.jms.BytesMessage
,javax.jms.Message
- Direct Known Subclasses:
ActiveMQBytesCompatibleMessage
public class ActiveMQBytesMessage extends ActiveMQMessage implements javax.jms.BytesMessage
ActiveMQ Artemis implementation of a JMSBytesMessage
.
-
-
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 ActiveMQBytesMessage(javax.jms.BytesMessage foreign, ClientSession session)
Foreign message constructorprotected
ActiveMQBytesMessage(ClientMessage message, ClientSession session)
Constructor on receipt at client sideprotected
ActiveMQBytesMessage(ClientSession session)
This constructor is used to construct messages prior to sending
-
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)
long
getBodyLength()
byte
getType()
boolean
isBodyAssignableTo(java.lang.Class c)
boolean
readBoolean()
byte
readByte()
int
readBytes(byte[] value)
int
readBytes(byte[] value, int length)
char
readChar()
double
readDouble()
float
readFloat()
int
readInt()
long
readLong()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
java.lang.String
readUTF()
void
reset()
void
writeBoolean(boolean value)
void
writeByte(byte value)
void
writeBytes(byte[] value)
void
writeBytes(byte[] value, int offset, int length)
void
writeChar(char value)
void
writeDouble(double value)
void
writeFloat(float value)
void
writeInt(int value)
void
writeLong(long value)
void
writeObject(java.lang.Object value)
void
writeShort(short value)
void
writeUTF(java.lang.String value)
-
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
-
ActiveMQBytesMessage
protected ActiveMQBytesMessage(ClientSession session)
This constructor is used to construct messages prior to sending
-
ActiveMQBytesMessage
protected ActiveMQBytesMessage(ClientMessage message, ClientSession session)
Constructor on receipt at client side
-
ActiveMQBytesMessage
public ActiveMQBytesMessage(javax.jms.BytesMessage foreign, ClientSession session) throws javax.jms.JMSException
Foreign message constructor- Throws:
javax.jms.JMSException
-
-
Method Detail
-
readBoolean
public boolean readBoolean() throws javax.jms.JMSException
- Specified by:
readBoolean
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readByte
public byte readByte() throws javax.jms.JMSException
- Specified by:
readByte
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readUnsignedByte
public int readUnsignedByte() throws javax.jms.JMSException
- Specified by:
readUnsignedByte
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readShort
public short readShort() throws javax.jms.JMSException
- Specified by:
readShort
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readUnsignedShort
public int readUnsignedShort() throws javax.jms.JMSException
- Specified by:
readUnsignedShort
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readChar
public char readChar() throws javax.jms.JMSException
- Specified by:
readChar
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readInt
public int readInt() throws javax.jms.JMSException
- Specified by:
readInt
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readLong
public long readLong() throws javax.jms.JMSException
- Specified by:
readLong
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readFloat
public float readFloat() throws javax.jms.JMSException
- Specified by:
readFloat
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readDouble
public double readDouble() throws javax.jms.JMSException
- Specified by:
readDouble
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readUTF
public java.lang.String readUTF() throws javax.jms.JMSException
- Specified by:
readUTF
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readBytes
public int readBytes(byte[] value) throws javax.jms.JMSException
- Specified by:
readBytes
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
readBytes
public int readBytes(byte[] value, int length) throws javax.jms.JMSException
- Specified by:
readBytes
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeBoolean
public void writeBoolean(boolean value) throws javax.jms.JMSException
- Specified by:
writeBoolean
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeByte
public void writeByte(byte value) throws javax.jms.JMSException
- Specified by:
writeByte
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeShort
public void writeShort(short value) throws javax.jms.JMSException
- Specified by:
writeShort
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeChar
public void writeChar(char value) throws javax.jms.JMSException
- Specified by:
writeChar
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeInt
public void writeInt(int value) throws javax.jms.JMSException
- Specified by:
writeInt
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeLong
public void writeLong(long value) throws javax.jms.JMSException
- Specified by:
writeLong
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeFloat
public void writeFloat(float value) throws javax.jms.JMSException
- Specified by:
writeFloat
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeDouble
public void writeDouble(double value) throws javax.jms.JMSException
- Specified by:
writeDouble
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeUTF
public void writeUTF(java.lang.String value) throws javax.jms.JMSException
- Specified by:
writeUTF
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeBytes
public void writeBytes(byte[] value) throws javax.jms.JMSException
- Specified by:
writeBytes
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeBytes
public void writeBytes(byte[] value, int offset, int length) throws javax.jms.JMSException
- Specified by:
writeBytes
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
writeObject
public void writeObject(java.lang.Object value) throws javax.jms.JMSException
- Specified by:
writeObject
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
reset
public void reset() throws javax.jms.JMSException
- Specified by:
reset
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
doBeforeReceive
public void doBeforeReceive() throws org.apache.activemq.artemis.api.core.ActiveMQException
- Overrides:
doBeforeReceive
in classActiveMQMessage
- Throws:
org.apache.activemq.artemis.api.core.ActiveMQException
-
clearBody
public void clearBody() throws javax.jms.JMSException
- Specified by:
clearBody
in interfacejavax.jms.Message
- Overrides:
clearBody
in classActiveMQMessage
- Throws:
javax.jms.JMSException
-
getBodyLength
public long getBodyLength() throws javax.jms.JMSException
- Specified by:
getBodyLength
in interfacejavax.jms.BytesMessage
- Throws:
javax.jms.JMSException
-
doBeforeSend
public void doBeforeSend() throws java.lang.Exception
- Overrides:
doBeforeSend
in classActiveMQMessage
- Throws:
java.lang.Exception
-
getType
public byte getType()
- Overrides:
getType
in classActiveMQMessage
-
isBodyAssignableTo
public boolean isBodyAssignableTo(java.lang.Class c)
- Specified by:
isBodyAssignableTo
in interfacejavax.jms.Message
- Overrides:
isBodyAssignableTo
in classActiveMQMessage
-
getBodyInternal
protected <T> T getBodyInternal(java.lang.Class<T> c)
- Overrides:
getBodyInternal
in classActiveMQMessage
-
-