public interface ClientMessage extends ICoreMessage
BYTES_TYPE, DEFAULT_TYPE, EMBEDDED_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_BRIDGE_DUPLICATE_ID, HDR_CONTENT_TYPE, HDR_DUPLICATE_DETECTION_ID, HDR_GROUP_ID, HDR_LARGE_BODY_SIZE, HDR_LARGE_COMPRESSED, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_ADDRESS, HDR_ORIGINAL_QUEUE, HDR_PREFIX, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_ROUTING_TYPE, HDR_SCALEDOWN_TO_IDS, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, MAP_TYPE, memoryOffset, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE
Modifier and Type | Method and Description |
---|---|
ClientMessage |
acknowledge()
Acknowledges reception of this message.
|
void |
checkCompletion()
This can be optionally used to verify if the entire message has been received.
|
ActiveMQBuffer |
getBodyBuffer()
The buffer to write the body.
|
InputStream |
getBodyInputStream()
Return the bodyInputStream for large messages
|
int |
getBodySize()
Returns the size (in bytes) of this message's body
|
int |
getDeliveryCount()
Returns the number of times this message was delivered.
|
ClientMessage |
individualAcknowledge()
Acknowledges reception of a single message.
|
ClientMessage |
putBooleanProperty(SimpleString key,
boolean value)
Overridden from
Message to enable fluent API |
ClientMessage |
putBooleanProperty(String key,
boolean value)
Overridden from
Message to enable fluent API |
ClientMessage |
putByteProperty(SimpleString key,
byte value)
Overridden from
Message to enable fluent API |
ClientMessage |
putByteProperty(String key,
byte value)
Overridden from
Message to enable fluent API |
ClientMessage |
putBytesProperty(SimpleString key,
byte[] value)
Overridden from
Message to enable fluent API |
ClientMessage |
putBytesProperty(String key,
byte[] value)
Overridden from
Message to enable fluent API |
ClientMessage |
putCharProperty(SimpleString key,
char value)
Overridden from
Message to enable fluent API |
ClientMessage |
putCharProperty(String key,
char value)
Overridden from
Message to enable fluent API |
ClientMessage |
putDoubleProperty(SimpleString key,
double value)
Overridden from
Message to enable fluent API |
ClientMessage |
putDoubleProperty(String key,
double value)
Overridden from
Message to enable fluent API |
ClientMessage |
putFloatProperty(SimpleString key,
float value)
Overridden from
Message to enable fluent API |
ClientMessage |
putFloatProperty(String key,
float value)
Overridden from
Message to enable fluent API |
ClientMessage |
putIntProperty(SimpleString key,
int value)
Overridden from
Message to enable fluent API |
ClientMessage |
putIntProperty(String key,
int value)
Overridden from
Message to enable fluent API |
ClientMessage |
putLongProperty(SimpleString key,
long value)
Overridden from
Message to enable fluent API |
ClientMessage |
putLongProperty(String key,
long value)
Overridden from
Message to enable fluent API |
ClientMessage |
putShortProperty(SimpleString key,
short value)
Overridden from
Message to enable fluent API |
ClientMessage |
putShortProperty(String key,
short value)
Overridden from
Message to enable fluent API |
ClientMessage |
putStringProperty(String key,
String value)
Overridden from
Message to enable fluent API |
void |
saveToOutputStream(OutputStream out)
Saves the content of the message to the OutputStream.
|
ClientMessage |
setBodyInputStream(InputStream bodyInputStream)
Sets the body's IntputStream.
|
ClientMessage |
setDeliveryCount(int deliveryCount)
Sets the delivery count for this message.
|
ClientMessage |
setOutputStream(OutputStream out)
Sets the OutputStream that will receive the content of a message received in a non blocking way.
|
boolean |
waitOutputStreamCompletion(long timeMilliseconds)
Wait the outputStream completion of the message.
|
ClientMessage |
writeBodyBufferBytes(byte[] bytes)
Overridden from
Message to enable fluent API |
ClientMessage |
writeBodyBufferString(String string)
Overridden from
Message to enable fluent API |
copyHeadersAndProperties, getBodyEncoder, getDataBuffer, getEndOfBodyPosition, getHeadersAndPropertiesEncodeSize, getReadOnlyBodyBuffer, getType, isServerMessage, receiveBuffer_1X, sendBuffer_1X, setType, toMap
acceptsConsumer, cleanupInternalProperties, containsProperty, containsProperty, copy, copy, decrementDurableRefCount, decrementRefCount, getAddress, getAddressSimpleString, getAnnotation, getAnnotationString, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getConnectionID, getContext, getDoubleProperty, getDoubleProperty, getDuplicateIDBytes, getDuplicateProperty, getEncodeSize, getExpiration, getExtraBytesProperty, getFloatProperty, getFloatProperty, getGroupID, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMemoryEstimate, getMessageID, getObjectProperty, getObjectProperty, getPersistentSize, getPersister, getPersistSize, getPriority, getPropertyNames, getRefCount, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getUserID, getValidatedUserID, incrementDurableRefCount, incrementRefCount, isDurable, isExpired, isLargeMessage, messageChanged, persist, putExtraBytesProperty, putObjectProperty, putObjectProperty, putStringProperty, putStringProperty, receiveBuffer, reencode, referenceOriginalMessage, rejectConsumer, releaseBuffer, reloadPersistence, removeAnnotation, removeExtraBytesProperty, removeProperty, removeProperty, sendBuffer, setAddress, setAddress, setAnnotation, setBuffer, setConnectionID, setContext, setDurable, setExpiration, setLastValueProperty, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, setValidatedUserID, toCore, toCore, toPropertyMap
int getDeliveryCount()
ClientMessage setDeliveryCount(int deliveryCount)
This method is not meant to be called by ActiveMQ Artemis clients.
deliveryCount
- message delivery countClientMessage acknowledge() throws ActiveMQException
If the session responsible to acknowledge this message has autoCommitAcks
set to
true
, the transaction will automatically commit the current transaction. Otherwise,
this acknowledgement will not be committed until the client commits the session transaction.
ActiveMQException
- if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()
ClientMessage individualAcknowledge() throws ActiveMQException
If the session responsible to acknowledge this message has autoCommitAcks
set to
true
, the transaction will automatically commit the current transaction. Otherwise,
this acknowledgement will not be committed until the client commits the session transaction.
ActiveMQException
- if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()
void checkCompletion() throws ActiveMQException
ActiveMQException
int getBodySize()
ClientMessage setOutputStream(OutputStream out) throws ActiveMQException
ActiveMQException
void saveToOutputStream(OutputStream out) throws ActiveMQException
ActiveMQException
boolean waitOutputStreamCompletion(long timeMilliseconds) throws ActiveMQException
timeMilliseconds
- - 0 means wait foreverActiveMQException
ClientMessage setBodyInputStream(InputStream bodyInputStream)
InputStream getBodyInputStream()
getBodyInputStream
in interface ICoreMessage
getBodyInputStream
in interface Message
ActiveMQBuffer getBodyBuffer()
getBodyBuffer
in interface ICoreMessage
getBodyBuffer
in interface Message
ClientMessage putBooleanProperty(SimpleString key, boolean value)
Message
to enable fluent APIputBooleanProperty
in interface Message
ClientMessage putBooleanProperty(String key, boolean value)
Message
to enable fluent APIputBooleanProperty
in interface Message
ClientMessage putByteProperty(SimpleString key, byte value)
Message
to enable fluent APIputByteProperty
in interface Message
ClientMessage putByteProperty(String key, byte value)
Message
to enable fluent APIputByteProperty
in interface Message
ClientMessage putBytesProperty(SimpleString key, byte[] value)
Message
to enable fluent APIputBytesProperty
in interface Message
ClientMessage putBytesProperty(String key, byte[] value)
Message
to enable fluent APIputBytesProperty
in interface Message
ClientMessage putShortProperty(SimpleString key, short value)
Message
to enable fluent APIputShortProperty
in interface Message
ClientMessage putShortProperty(String key, short value)
Message
to enable fluent APIputShortProperty
in interface Message
ClientMessage putCharProperty(SimpleString key, char value)
Message
to enable fluent APIputCharProperty
in interface Message
ClientMessage putCharProperty(String key, char value)
Message
to enable fluent APIputCharProperty
in interface Message
ClientMessage putIntProperty(SimpleString key, int value)
Message
to enable fluent APIputIntProperty
in interface Message
ClientMessage putIntProperty(String key, int value)
Message
to enable fluent APIputIntProperty
in interface Message
ClientMessage putLongProperty(SimpleString key, long value)
Message
to enable fluent APIputLongProperty
in interface Message
ClientMessage putLongProperty(String key, long value)
Message
to enable fluent APIputLongProperty
in interface Message
ClientMessage putFloatProperty(SimpleString key, float value)
Message
to enable fluent APIputFloatProperty
in interface Message
ClientMessage putFloatProperty(String key, float value)
Message
to enable fluent APIputFloatProperty
in interface Message
ClientMessage putDoubleProperty(SimpleString key, double value)
Message
to enable fluent APIputDoubleProperty
in interface Message
ClientMessage putDoubleProperty(String key, double value)
Message
to enable fluent APIputDoubleProperty
in interface Message
ClientMessage putStringProperty(String key, String value)
Message
to enable fluent APIputStringProperty
in interface Message
key
- property namevalue
- property valueClientMessage writeBodyBufferBytes(byte[] bytes)
Message
to enable fluent APIClientMessage writeBodyBufferString(String string)
Message
to enable fluent APICopyright © 2018 JBoss by Red Hat. All rights reserved.