Class AmqpJmsStreamMessageFacade
- java.lang.Object
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
-
- org.apache.qpid.jms.provider.amqp.message.AmqpJmsStreamMessageFacade
-
- All Implemented Interfaces:
JmsMessageFacade,JmsStreamMessageFacade,TraceableMessage
public class AmqpJmsStreamMessageFacade extends AmqpJmsMessageFacade implements JmsStreamMessageFacade
Wrapper around an AMQP Message instance that will be treated as a JMS StreamMessage type.
-
-
Field Summary
-
Fields inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
connection
-
-
Constructor Summary
Constructors Constructor Description AmqpJmsStreamMessageFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JmsStreamMessageasJmsMessage()voidclearBody()Clears the contents of this Message.AmqpJmsStreamMessageFacadecopy()Create a new instance and perform a deep copy of this object's contents.bytegetJmsMsgType()booleanhasBody()Returns true if the underlying message has a body, false if the body is empty.booleanhasNext()protected voidinitializeEmptyBody()Used to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.Objectpeek()Peek and return the next element in the stream.voidpop()Pops the next element in the stream.voidput(Object value)Writes a new object value to the stream.voidreset()Reset the position of the stream to the beginning.-
Methods inherited from class org.apache.qpid.jms.provider.amqp.message.AmqpJmsMessageFacade
applicationPropertyExists, clearProperties, copyInto, encodeMessage, filterTracingAnnotations, getAmqpTimeToLiveOverride, getApplicationProperty, getApplicationPropertyNames, getContentType, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getReplyToGroupId, getTimestamp, getTracingAnnotation, getTracingContext, getType, getUserId, getUserIdBytes, hasAmqpTimeToLiveOverride, initialize, initialize, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, onSend, propertyExists, removeTracingAnnotation, removeTracingContext, setAmqpTimeToLiveOverride, setApplicationProperty, setContentType, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setReplyToGroupId, setTimestamp, setTracingAnnotation, setTracingContext, setType, setUserId, setUserIdBytes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.qpid.jms.message.facade.JmsMessageFacade
clearProperties, encodeMessage, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getTimestamp, getType, getUserId, getUserIdBytes, isDeliveryTimeTransmitted, isPersistent, isRedelivered, onDispatch, onSend, propertyExists, setCorrelationId, setCorrelationIdBytes, setDeliveryCount, setDeliveryTime, setDestination, setExpiration, setGroupId, setGroupSequence, setMessageId, setPersistent, setPriority, setProperty, setProviderMessageIdObject, setRedelivered, setRedeliveryCount, setReplyTo, setTimestamp, setType, setUserId, setUserIdBytes
-
Methods inherited from interface org.apache.qpid.jms.tracing.TraceableMessage
filterTracingAnnotations, getTracingAnnotation, getTracingContext, removeTracingAnnotation, removeTracingContext, setTracingAnnotation, setTracingContext
-
-
-
-
Method Detail
-
copy
public AmqpJmsStreamMessageFacade copy()
Description copied from interface:JmsMessageFacadeCreate a new instance and perform a deep copy of this object's contents.- Specified by:
copyin interfaceJmsMessageFacade- Specified by:
copyin interfaceJmsStreamMessageFacade- Overrides:
copyin classAmqpJmsMessageFacade- Returns:
- a copy of this JmsMessageFacade instance.
-
getJmsMsgType
public byte getJmsMsgType()
- Overrides:
getJmsMsgTypein classAmqpJmsMessageFacade- Returns:
- the appropriate byte value that indicates the type of message this is.
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfaceJmsStreamMessageFacade- Returns:
- true if the stream contains another element beyond the current.
-
peek
public Object peek() throws javax.jms.MessageEOFException
Description copied from interface:JmsStreamMessageFacadePeek and return the next element in the stream. If the stream has been fully read then this method should throw a MessageEOFException. Multiple calls to peek should return the same element.- Specified by:
peekin interfaceJmsStreamMessageFacade- Returns:
- the next value in the stream without removing it.
- Throws:
javax.jms.MessageEOFException- if end of message stream has been reached.
-
pop
public void pop() throws javax.jms.MessageEOFExceptionDescription copied from interface:JmsStreamMessageFacadePops the next element in the stream.- Specified by:
popin interfaceJmsStreamMessageFacade- Throws:
javax.jms.MessageEOFException- if end of message stream has been reached.
-
put
public void put(Object value)
Description copied from interface:JmsStreamMessageFacadeWrites a new object value to the stream. If the value provided is a byte[] its entry then it is assumed that it was copied by the caller and its value will not be altered by the provider.- Specified by:
putin interfaceJmsStreamMessageFacade- Parameters:
value- The object value to be written to the stream.
-
reset
public void reset()
Description copied from interface:JmsStreamMessageFacadeReset the position of the stream to the beginning.- Specified by:
resetin interfaceJmsStreamMessageFacade
-
clearBody
public void clearBody()
Description copied from interface:JmsMessageFacadeClears the contents of this Message.- Specified by:
clearBodyin interfaceJmsMessageFacade- Overrides:
clearBodyin classAmqpJmsMessageFacade
-
hasBody
public boolean hasBody()
Description copied from interface:JmsMessageFacadeReturns true if the underlying message has a body, false if the body is empty.- Specified by:
hasBodyin interfaceJmsMessageFacade- Overrides:
hasBodyin classAmqpJmsMessageFacade- Returns:
- true if the underlying message has a body, false if the body is empty.
-
asJmsMessage
public JmsStreamMessage asJmsMessage()
- Overrides:
asJmsMessagein classAmqpJmsMessageFacade
-
initializeEmptyBody
protected void initializeEmptyBody()
Description copied from class:AmqpJmsMessageFacadeUsed to indicate that a Message object should empty the body element and make any other internal updates to reflect the message now has no body value.- Overrides:
initializeEmptyBodyin classAmqpJmsMessageFacade
-
-