public class RMQStreamMessage extends RMQMessage implements javax.jms.StreamMessage
StreamMessage interface.DEFAULT_MESSAGE_BODY_SIZE, logger, MSG_EOF, NOT_READABLE, NOT_WRITEABLE, UNABLE_TO_CAST| Constructor and Description |
|---|
RMQStreamMessage() |
RMQStreamMessage(java.util.List<java.lang.String> trustedPackages) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearBodyInternal() |
protected <T> T |
doGetBody(java.lang.Class<T> c) |
<T> T |
getBody(java.lang.Class<T> c) |
boolean |
isAmqpWritable() |
boolean |
isBodyAssignableTo(java.lang.Class c) |
protected void |
readAmqpBody(byte[] barr)
Invoked when an AMQP message is being transformed into a RMQMessage
The implementing class should only read its body by this method
|
protected void |
readBody(java.io.ObjectInput inputStream,
java.io.ByteArrayInputStream bin)
Invoked when a message is being deserialized to read and decode the message body.
|
boolean |
readBoolean() |
byte |
readByte() |
int |
readBytes(byte[] value) |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
java.lang.Object |
readObject()
reads an object from the stream that was used to serialize this message
|
short |
readShort() |
java.lang.String |
readString() |
static RMQMessage |
recreate(javax.jms.StreamMessage msg) |
void |
reset() |
protected void |
writeAmqpBody(java.io.ByteArrayOutputStream out)
Invoked when
RMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. |
protected void |
writeBody(java.io.ObjectOutput out,
java.io.ByteArrayOutputStream bout)
Invoked when
RMQMessage.toByteArray() is called to create
a byte[] from a message. |
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 |
writeString(java.lang.String value) |
acknowledge, clearBody, clearProperties, clone, copyAttributes, doNotDeclareReplyToDestination, equals, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getInternalID, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getRabbitDeliveryTag, getSession, getShortProperty, getStringProperty, hashCode, isReadonlyBody, isReadOnlyProperties, loggerDebugByteArray, propertyExists, readPrimitive, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setRabbitDeliveryTag, setReadonly, setReadOnlyBody, setReadOnlyProperties, setSession, setShortProperty, setStringProperty, writePrimitive, writePrimitivefinalize, getClass, notify, notifyAll, toString, wait, wait, waitacknowledge, clearBody, clearProperties, 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, setStringPropertypublic RMQStreamMessage(java.util.List<java.lang.String> trustedPackages)
public RMQStreamMessage()
public boolean readBoolean()
throws javax.jms.JMSException
readBoolean in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic byte readByte()
throws javax.jms.JMSException
readByte in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic short readShort()
throws javax.jms.JMSException
readShort in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic char readChar()
throws javax.jms.JMSException
readChar in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic int readInt()
throws javax.jms.JMSException
readInt in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic long readLong()
throws javax.jms.JMSException
readLong in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic float readFloat()
throws javax.jms.JMSException
readFloat in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic double readDouble()
throws javax.jms.JMSException
readDouble in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic java.lang.String readString()
throws javax.jms.JMSException
readString in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic int readBytes(byte[] value)
throws javax.jms.JMSException
readBytes in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic java.lang.Object readObject()
throws javax.jms.JMSException
readObject in interface javax.jms.StreamMessagejavax.jms.JMSException - if a deserialization exception happenspublic void writeBoolean(boolean value)
throws javax.jms.JMSException
writeBoolean in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeByte(byte value)
throws javax.jms.JMSException
writeByte in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeShort(short value)
throws javax.jms.JMSException
writeShort in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeChar(char value)
throws javax.jms.JMSException
writeChar in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeInt(int value)
throws javax.jms.JMSException
writeInt in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeLong(long value)
throws javax.jms.JMSException
writeLong in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeFloat(float value)
throws javax.jms.JMSException
writeFloat in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeDouble(double value)
throws javax.jms.JMSException
writeDouble in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeString(java.lang.String value)
throws javax.jms.JMSException
writeString in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeBytes(byte[] value)
throws javax.jms.JMSException
writeBytes in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeBytes(byte[] value,
int offset,
int length)
throws javax.jms.JMSException
writeBytes in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void writeObject(java.lang.Object value)
throws javax.jms.JMSException
writeObject in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void reset()
throws javax.jms.JMSException
reset in interface javax.jms.StreamMessagejavax.jms.JMSExceptionpublic void clearBodyInternal()
throws javax.jms.JMSException
clearBodyInternal in class RMQMessagejavax.jms.JMSExceptionprotected void writeBody(java.io.ObjectOutput out,
java.io.ByteArrayOutputStream bout)
throws java.io.IOException
RMQMessage.toByteArray() is called to create
a byte[] from a message. Each subclass must implement this, but ONLY
write its specific body. All the properties defined in Message
will be written by the parent class.writeBody in class RMQMessageout - - the output stream to which the structured part of message body (scalar types) is writtenbout - - the output stream to which the un-structured part of message body (explicit bytes) is writtenjava.io.IOException - if the body can not be writtenprotected void readBody(java.io.ObjectInput inputStream,
java.io.ByteArrayInputStream bin)
throws java.io.IOException,
java.lang.ClassNotFoundException
readBody in class RMQMessageinputStream - - the stream to read its body frombin - - the underlying byte input streamjava.io.IOException - if a read error occurs on the input streamjava.lang.ClassNotFoundException - if the object class cannot be foundprotected void readAmqpBody(byte[] barr)
RMQMessagereadAmqpBody in class RMQMessagebarr - - the byte array payload of the AMQP messageprotected void writeAmqpBody(java.io.ByteArrayOutputStream out)
throws java.io.IOException
RMQMessageRMQMessage.toAmqpByteArray() is called to create
a byte[] from a message. Each subclass must implement this, but ONLY
write its specific body.writeAmqpBody in class RMQMessageout - - the output stream to which the message body is writtenjava.io.IOException - if the body can not be writtenpublic static final RMQMessage recreate(javax.jms.StreamMessage msg) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic <T> T getBody(java.lang.Class<T> c)
throws javax.jms.JMSException
getBody in interface javax.jms.MessagegetBody in class RMQMessagejavax.jms.JMSExceptionprotected <T> T doGetBody(java.lang.Class<T> c)
doGetBody in class RMQMessagepublic boolean isBodyAssignableTo(java.lang.Class c)
isBodyAssignableTo in interface javax.jms.Messagepublic boolean isAmqpWritable()
isAmqpWritable in class RMQMessageCopyright © 2023. All rights reserved.