Package org.apache.qpid.jms.message
Class JmsBytesMessage
- java.lang.Object
-
- org.apache.qpid.jms.message.JmsMessage
-
- org.apache.qpid.jms.message.JmsBytesMessage
-
- All Implemented Interfaces:
javax.jms.BytesMessage,javax.jms.Message
public class JmsBytesMessage extends JmsMessage implements javax.jms.BytesMessage
-
-
Field Summary
Fields Modifier and Type Field Description protected DataInputStreamdataInprotected DataOutputStreamdataOut-
Fields inherited from class org.apache.qpid.jms.message.JmsMessage
acknowledgeCallback, connection, readOnly, readOnlyBody, readOnlyProperties, validatePropertyNames
-
-
Constructor Summary
Constructors Constructor Description JmsBytesMessage(JmsBytesMessageFacade facade)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBody()JmsBytesMessagecopy()protected <T> TdoGetBody(Class<T> asType)booleanequals(Object other)longgetBodyLength()inthashCode()booleanisBodyAssignableTo(Class target)voidonSend(long producerTtl)Used to trigger processing required to place the message in a state where it is ready to be written to the wire.booleanreadBoolean()bytereadByte()intreadBytes(byte[] value)intreadBytes(byte[] value, int length)charreadChar()doublereadDouble()floatreadFloat()intreadInt()longreadLong()shortreadShort()intreadUnsignedByte()intreadUnsignedShort()StringreadUTF()voidreset()StringtoString()voidwriteBoolean(boolean value)voidwriteByte(byte value)voidwriteBytes(byte[] value)voidwriteBytes(byte[] value, int offset, int length)voidwriteChar(char value)voidwriteDouble(double value)voidwriteFloat(float value)voidwriteInt(int value)voidwriteLong(long value)voidwriteObject(Object value)voidwriteShort(short value)voidwriteUTF(String value)-
Methods inherited from class org.apache.qpid.jms.message.JmsMessage
acknowledge, checkReadOnly, checkReadOnlyBody, checkReadOnlyProperties, checkWriteOnlyBody, clearProperties, copy, getAcknowledgeCallback, getAllPropertyNames, getBody, getBooleanProperty, getByteProperty, getConnection, getDoubleProperty, getFacade, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDeliveryTime, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, isExpired, isReadOnly, isReadOnlyBody, isReadOnlyProperties, isValidatePropertyNames, onDispatch, onSendComplete, propertyExists, setAcknowledgeCallback, setBooleanProperty, setByteProperty, setConnection, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDeliveryTime, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setReadOnly, setReadOnlyBody, setReadOnlyProperties, setShortProperty, setStringProperty, setValidatePropertyNames
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, 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
-
dataOut
protected transient DataOutputStream dataOut
-
dataIn
protected transient DataInputStream dataIn
-
-
Constructor Detail
-
JmsBytesMessage
public JmsBytesMessage(JmsBytesMessageFacade facade)
-
-
Method Detail
-
copy
public JmsBytesMessage copy() throws javax.jms.JMSException
- Overrides:
copyin classJmsMessage- Throws:
javax.jms.JMSException
-
equals
public boolean equals(Object other)
- Overrides:
equalsin classJmsMessage
-
hashCode
public int hashCode()
- Overrides:
hashCodein classJmsMessage
-
clearBody
public void clearBody() throws javax.jms.JMSException- Specified by:
clearBodyin interfacejavax.jms.Message- Overrides:
clearBodyin classJmsMessage- Throws:
javax.jms.JMSException
-
getBodyLength
public long getBodyLength() throws javax.jms.JMSException- Specified by:
getBodyLengthin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readBoolean
public boolean readBoolean() throws javax.jms.JMSException- Specified by:
readBooleanin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readByte
public byte readByte() throws javax.jms.JMSException- Specified by:
readBytein interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readUnsignedByte
public int readUnsignedByte() throws javax.jms.JMSException- Specified by:
readUnsignedBytein interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readShort
public short readShort() throws javax.jms.JMSException- Specified by:
readShortin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readUnsignedShort
public int readUnsignedShort() throws javax.jms.JMSException- Specified by:
readUnsignedShortin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readChar
public char readChar() throws javax.jms.JMSException- Specified by:
readCharin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readInt
public int readInt() throws javax.jms.JMSException- Specified by:
readIntin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readLong
public long readLong() throws javax.jms.JMSException- Specified by:
readLongin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readFloat
public float readFloat() throws javax.jms.JMSException- Specified by:
readFloatin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readDouble
public double readDouble() throws javax.jms.JMSException- Specified by:
readDoublein interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readUTF
public String readUTF() throws javax.jms.JMSException
- Specified by:
readUTFin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readBytes
public int readBytes(byte[] value) throws javax.jms.JMSException- Specified by:
readBytesin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
readBytes
public int readBytes(byte[] value, int length) throws javax.jms.JMSException- Specified by:
readBytesin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeBoolean
public void writeBoolean(boolean value) throws javax.jms.JMSException- Specified by:
writeBooleanin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeByte
public void writeByte(byte value) throws javax.jms.JMSException- Specified by:
writeBytein interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeShort
public void writeShort(short value) throws javax.jms.JMSException- Specified by:
writeShortin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeChar
public void writeChar(char value) throws javax.jms.JMSException- Specified by:
writeCharin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeInt
public void writeInt(int value) throws javax.jms.JMSException- Specified by:
writeIntin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeLong
public void writeLong(long value) throws javax.jms.JMSException- Specified by:
writeLongin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeFloat
public void writeFloat(float value) throws javax.jms.JMSException- Specified by:
writeFloatin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeDouble
public void writeDouble(double value) throws javax.jms.JMSException- Specified by:
writeDoublein interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeUTF
public void writeUTF(String value) throws javax.jms.JMSException
- Specified by:
writeUTFin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeBytes
public void writeBytes(byte[] value) throws javax.jms.JMSException- Specified by:
writeBytesin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeBytes
public void writeBytes(byte[] value, int offset, int length) throws javax.jms.JMSException- Specified by:
writeBytesin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
writeObject
public void writeObject(Object value) throws javax.jms.JMSException
- Specified by:
writeObjectin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
reset
public void reset() throws javax.jms.JMSException- Specified by:
resetin interfacejavax.jms.BytesMessage- Throws:
javax.jms.JMSException
-
onSend
public void onSend(long producerTtl) throws javax.jms.JMSExceptionDescription copied from class:JmsMessageUsed to trigger processing required to place the message in a state where it is ready to be written to the wire. This processing can include such tasks as ensuring that the proper message headers are set or compressing message bodies etc. During this call the message is placed in a read-only mode and will not be returned to a writable state until send completion is triggered.- Overrides:
onSendin classJmsMessage- Parameters:
producerTtl- the time to live value that the producer was configured with at send time.- Throws:
javax.jms.JMSException- if an error occurs while preparing the message for send.
-
toString
public String toString()
- Overrides:
toStringin classJmsMessage
-
isBodyAssignableTo
public boolean isBodyAssignableTo(Class target) throws javax.jms.JMSException
- Specified by:
isBodyAssignableToin interfacejavax.jms.Message- Overrides:
isBodyAssignableToin classJmsMessage- Throws:
javax.jms.JMSException
-
doGetBody
protected <T> T doGetBody(Class<T> asType) throws javax.jms.JMSException
- Overrides:
doGetBodyin classJmsMessage- Throws:
javax.jms.JMSException
-
-