Interface JmsStreamMessageFacade
- All Superinterfaces:
JmsMessageFacade,TraceableMessage
- All Known Implementing Classes:
AmqpJmsStreamMessageFacade
Interface for a Message Facade that wraps a stream or list based provider
message instance. The interface provides the basic entry points into a
stream style message where primitive values are read and written as opaque
objects.
-
Method Summary
Modifier and TypeMethodDescriptioncopy()Create a new instance and perform a deep copy of this object's contents.booleanhasNext()peek()Peek and return the next element in the stream.voidpop()Pops the next element in the stream.voidWrites a new object value to the stream.voidreset()Reset the position of the stream to the beginning.Methods inherited from interface org.apache.qpid.jms.message.facade.JmsMessageFacade
clearBody, clearProperties, encodeMessage, getCorrelationId, getCorrelationIdBytes, getDeliveryCount, getDeliveryTime, getDestination, getExpiration, getGroupId, getGroupSequence, getMessageId, getPriority, getProperty, getPropertyNames, getProviderMessageIdObject, getRedeliveryCount, getReplyTo, getTimestamp, getType, getUserId, getUserIdBytes, hasBody, 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, setUserIdBytesMethods inherited from interface org.apache.qpid.jms.tracing.TraceableMessage
filterTracingAnnotations, getTracingAnnotation, getTracingContext, removeTracingAnnotation, removeTracingContext, setTracingAnnotation, setTracingContext
-
Method Details
-
copy
Description copied from interface:JmsMessageFacadeCreate a new instance and perform a deep copy of this object's contents.- Specified by:
copyin interfaceJmsMessageFacade- Returns:
- a deep copy of this Message Facade including a complete copy of the byte contents of the wrapped message.
- Throws:
jakarta.jms.JMSException- if an error occurs while copying the message.
-
hasNext
boolean hasNext()- Returns:
- true if the stream contains another element beyond the current.
-
peek
Peek 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.- Returns:
- the next value in the stream without removing it.
- Throws:
jakarta.jms.MessageEOFException- if end of message stream has been reached.
-
pop
void pop() throws jakarta.jms.MessageEOFExceptionPops the next element in the stream.- Throws:
jakarta.jms.MessageEOFException- if end of message stream has been reached.
-
put
Writes 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.- Parameters:
value- The object value to be written to the stream.
-
reset
void reset()Reset the position of the stream to the beginning.
-