public interface ClientMessage extends Message
BYTES_TYPE, DEFAULT_TYPE, HDR_ACTUAL_EXPIRY_TIME, 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_SCHEDULED_DELIVERY_TIME, MAP_TYPE, 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.
|
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(SimpleString key,
SimpleString 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 |
containsProperty, containsProperty, getAddress, getBodyBuffer, getBodyBufferDuplicate, getBooleanProperty, getBooleanProperty, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDoubleProperty, getDoubleProperty, getEncodeSize, getExpiration, getFloatProperty, getFloatProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPriority, getPropertyNames, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getUserID, isDurable, isExpired, isLargeMessage, putObjectProperty, putObjectProperty, removeProperty, removeProperty, setAddress, setDurable, setExpiration, setPriority, setTimestamp, setUserID, toMap
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)
ClientMessage putBooleanProperty(SimpleString key, boolean value)
Message
to enable fluent APIputBooleanProperty
in interface Message
key
- property namevalue
- property valueClientMessage putBooleanProperty(String key, boolean value)
Message
to enable fluent APIputBooleanProperty
in interface Message
Message.putBooleanProperty(SimpleString, boolean)
ClientMessage putByteProperty(SimpleString key, byte value)
Message
to enable fluent APIputByteProperty
in interface Message
key
- property namevalue
- property valueClientMessage putByteProperty(String key, byte value)
Message
to enable fluent APIputByteProperty
in interface Message
Message.putByteProperty(SimpleString, byte)
ClientMessage putBytesProperty(SimpleString key, byte[] value)
Message
to enable fluent APIputBytesProperty
in interface Message
key
- property namevalue
- property valueClientMessage putBytesProperty(String key, byte[] value)
Message
to enable fluent APIputBytesProperty
in interface Message
Message.putBytesProperty(SimpleString, byte[])
ClientMessage putShortProperty(SimpleString key, short value)
Message
to enable fluent APIputShortProperty
in interface Message
key
- property namevalue
- property valueClientMessage putShortProperty(String key, short value)
Message
to enable fluent APIputShortProperty
in interface Message
Message.putShortProperty(SimpleString, short)
ClientMessage putCharProperty(SimpleString key, char value)
Message
to enable fluent APIputCharProperty
in interface Message
key
- property namevalue
- property valueClientMessage putCharProperty(String key, char value)
Message
to enable fluent APIputCharProperty
in interface Message
Message.putCharProperty(SimpleString, char)
ClientMessage putIntProperty(SimpleString key, int value)
Message
to enable fluent APIputIntProperty
in interface Message
key
- property namevalue
- property valueClientMessage putIntProperty(String key, int value)
Message
to enable fluent APIputIntProperty
in interface Message
Message.putIntProperty(SimpleString, int)
ClientMessage putLongProperty(SimpleString key, long value)
Message
to enable fluent APIputLongProperty
in interface Message
key
- property namevalue
- property valueClientMessage putLongProperty(String key, long value)
Message
to enable fluent APIputLongProperty
in interface Message
Message.putLongProperty(SimpleString, long)
ClientMessage putFloatProperty(SimpleString key, float value)
Message
to enable fluent APIputFloatProperty
in interface Message
key
- property namevalue
- property valueClientMessage putFloatProperty(String key, float value)
Message
to enable fluent APIputFloatProperty
in interface Message
Message.putFloatProperty(SimpleString, float)
ClientMessage putDoubleProperty(SimpleString key, double value)
Message
to enable fluent APIputDoubleProperty
in interface Message
key
- property namevalue
- property valueClientMessage putDoubleProperty(String key, double value)
Message
to enable fluent APIputDoubleProperty
in interface Message
Message.putDoubleProperty(SimpleString, double)
ClientMessage putStringProperty(SimpleString key, SimpleString value)
Message
to enable fluent APIputStringProperty
in interface Message
key
- property namevalue
- property valueClientMessage 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 APIwriteBodyBufferBytes
in interface Message
ClientMessage writeBodyBufferString(String string)
Message
to enable fluent APIwriteBodyBufferString
in interface Message
Copyright © 2016 JBoss by Red Hat. All rights reserved.