public class ClientMessageImpl extends MessageImpl implements ClientMessageInternal
| Modifier and Type | Field and Description |
|---|---|
static SimpleString |
REPLYTO_HEADER_NAME |
address, BODY_OFFSET, bodyBuffer, buffer, BUFFER_HEADER_SPACE, bufferValid, durable, HDR_BRIDGE_DUPLICATE_ID, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_SCALEDOWN_TO_IDS, messageID, priority, properties, timestamp, typeBYTES_TYPE, DEFAULT_TYPE, HDR_ACTUAL_EXPIRY_TIME, 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_ROUTE_TO_IDS, HDR_ROUTING_TYPE, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, MAP_TYPE, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE| Constructor and Description |
|---|
ClientMessageImpl() |
ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize) |
| Modifier and Type | Method and Description |
|---|---|
ClientMessageImpl |
acknowledge()
Acknowledges reception of this message.
|
void |
discardBody()
Discard unused packets (used on large-message)
|
BodyEncoder |
getBodyEncoder() |
InputStream |
getBodyInputStream() |
int |
getBodySize()
Returns the size (in bytes) of this message's body
|
int |
getDeliveryCount()
Returns the number of times this message was delivered.
|
int |
getFlowControlSize()
Size used for FlowControl
|
ClientMessageImpl |
individualAcknowledge()
Acknowledges reception of a single message.
|
boolean |
isCompressed() |
boolean |
isLargeMessage()
Returns whether this message is a large message or a regular message.
|
boolean |
isServerMessage() |
void |
onReceipt(ClientConsumerInternal consumer) |
ClientMessageImpl |
putBooleanProperty(SimpleString key,
boolean value)
Puts a boolean property in this message.
|
ClientMessageImpl |
putBooleanProperty(String key,
boolean value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putByteProperty(SimpleString key,
byte value)
Puts a byte property in this message.
|
ClientMessageImpl |
putByteProperty(String key,
byte value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putBytesProperty(SimpleString key,
byte[] value)
Puts a byte[] property in this message.
|
ClientMessageImpl |
putBytesProperty(String key,
byte[] value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putCharProperty(SimpleString key,
char value)
Puts a char property in this message.
|
ClientMessageImpl |
putCharProperty(String key,
char value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putDoubleProperty(SimpleString key,
double value)
Puts a double property in this message.
|
ClientMessageImpl |
putDoubleProperty(String key,
double value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putFloatProperty(SimpleString key,
float value)
Puts a float property in this message.
|
ClientMessageImpl |
putFloatProperty(String key,
float value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putIntProperty(SimpleString key,
int value)
Puts an int property in this message.
|
ClientMessageImpl |
putIntProperty(String key,
int value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putLongProperty(SimpleString key,
long value)
Puts a long property in this message.
|
ClientMessageImpl |
putLongProperty(String key,
long value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putObjectProperty(SimpleString key,
Object value)
Puts an Object property in this message.
|
ClientMessageImpl |
putObjectProperty(String key,
Object value) |
ClientMessageImpl |
putShortProperty(SimpleString key,
short value)
Puts a short property in this message.
|
ClientMessageImpl |
putShortProperty(String key,
short value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putStringProperty(SimpleString key,
SimpleString value)
Puts a SimpleString property in this message.
|
ClientMessageImpl |
putStringProperty(String key,
String value)
Puts a String property in this message.
|
void |
saveToOutputStream(OutputStream out)
Saves the content of the message to the OutputStream.
|
ClientMessageImpl |
setBodyInputStream(InputStream bodyInputStream)
Sets the body's IntputStream.
|
ClientMessageImpl |
setDeliveryCount(int deliveryCount)
Sets the delivery count for this message.
|
void |
setFlowControlSize(int flowControlSize)
Size used for FlowControl
|
ClientMessageImpl |
setOutputStream(OutputStream out)
Sets the OutputStream that will receive the content of a message received in a non blocking way.
|
String |
toString() |
boolean |
waitOutputStreamCompletion(long timeMilliseconds)
Wait the outputStream completion of the message.
|
ClientMessageImpl |
writeBodyBufferBytes(byte[] bytes)
Writes the input byte array to the message body ActiveMQBuffer
|
ClientMessageImpl |
writeBodyBufferString(String string)
Writes the input String to the message body ActiveMQBuffer
|
bodyChanged, bodyToString, checkCompletion, containsProperty, containsProperty, copyHeadersAndProperties, createBody, decode, decodeFromBuffer, decodeHeadersAndProperties, encode, encodeHeadersAndProperties, equals, getAddress, getBodyBuffer, getBodyBufferDuplicate, getBooleanProperty, getBooleanProperty, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDoubleProperty, getDoubleProperty, getEncodedBuffer, getEncodeSize, getEndOfBodyPosition, getEndOfMessagePosition, getExpiration, getFloatProperty, getFloatProperty, getHeadersAndPropertiesEncodeSize, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPriority, getProperties, getPropertyNames, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getTypedProperties, getUserID, getWholeBuffer, hashCode, isDurable, isExpired, putTypedProperties, removeProperty, removeProperty, setAddress, setAddressTransient, setDurable, setExpiration, setPriority, setTimestamp, setType, setUserID, toMap, toPropertyMapclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetProperties, setAddressTransientcheckCompletioncontainsProperty, 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, removeProperty, removeProperty, setAddress, setDurable, setExpiration, setPriority, setTimestamp, setUserID, toMap, toPropertyMappublic static final SimpleString REPLYTO_HEADER_NAME
public ClientMessageImpl()
public ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize)
public boolean isServerMessage()
isServerMessage in interface MessageInternalpublic void onReceipt(ClientConsumerInternal consumer)
onReceipt in interface ClientMessageInternalpublic ClientMessageImpl setDeliveryCount(int deliveryCount)
ClientMessageThis method is not meant to be called by ActiveMQ Artemis clients.
setDeliveryCount in interface ClientMessagedeliveryCount - message delivery countpublic int getDeliveryCount()
ClientMessagegetDeliveryCount in interface ClientMessagepublic ClientMessageImpl acknowledge() throws ActiveMQException
ClientMessage
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.
acknowledge in interface ClientMessageActiveMQException - if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()public ClientMessageImpl individualAcknowledge() throws ActiveMQException
ClientMessage
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.
individualAcknowledge in interface ClientMessageActiveMQException - if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()public int getFlowControlSize()
ClientMessageInternalgetFlowControlSize in interface ClientMessageInternalpublic void setFlowControlSize(int flowControlSize)
ClientMessageInternalsetFlowControlSize in interface ClientMessageInternalpublic boolean isLargeMessage()
MessageisLargeMessage in interface Messagepublic boolean isCompressed()
isCompressed in interface ClientMessageInternalpublic int getBodySize()
ClientMessagegetBodySize in interface ClientMessagepublic void saveToOutputStream(OutputStream out) throws ActiveMQException
ClientMessagesaveToOutputStream in interface ClientMessageActiveMQExceptionpublic ClientMessageImpl setOutputStream(OutputStream out) throws ActiveMQException
ClientMessagesetOutputStream in interface ClientMessageActiveMQExceptionpublic boolean waitOutputStreamCompletion(long timeMilliseconds)
throws ActiveMQException
ClientMessagewaitOutputStreamCompletion in interface ClientMessagetimeMilliseconds - - 0 means wait foreverActiveMQExceptionpublic void discardBody()
ClientMessageInternaldiscardBody in interface ClientMessageInternalpublic InputStream getBodyInputStream()
getBodyInputStream in interface MessageInternalpublic ClientMessageImpl setBodyInputStream(InputStream bodyInputStream)
ClientMessagesetBodyInputStream in interface ClientMessagebodyInputStream - the bodyInputStream to setpublic BodyEncoder getBodyEncoder() throws ActiveMQException
getBodyEncoder in interface MessageInternalgetBodyEncoder in class MessageImplActiveMQExceptionpublic ClientMessageImpl putBooleanProperty(SimpleString key, boolean value)
MessageputBooleanProperty in interface ClientMessageputBooleanProperty in interface MessageputBooleanProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putByteProperty(SimpleString key, byte value)
MessageputByteProperty in interface ClientMessageputByteProperty in interface MessageputByteProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putBytesProperty(SimpleString key, byte[] value)
MessageputBytesProperty in interface ClientMessageputBytesProperty in interface MessageputBytesProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putCharProperty(SimpleString key, char value)
MessageputCharProperty in interface ClientMessageputCharProperty in interface MessageputCharProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putCharProperty(String key, char value)
ClientMessageMessage to enable fluent APIputCharProperty in interface ClientMessageputCharProperty in interface MessageputCharProperty in class MessageImplMessage.putCharProperty(SimpleString, char)public ClientMessageImpl putShortProperty(SimpleString key, short value)
MessageputShortProperty in interface ClientMessageputShortProperty in interface MessageputShortProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putIntProperty(SimpleString key, int value)
MessageputIntProperty in interface ClientMessageputIntProperty in interface MessageputIntProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putLongProperty(SimpleString key, long value)
MessageputLongProperty in interface ClientMessageputLongProperty in interface MessageputLongProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putFloatProperty(SimpleString key, float value)
MessageputFloatProperty in interface ClientMessageputFloatProperty in interface MessageputFloatProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putDoubleProperty(SimpleString key, double value)
MessageputDoubleProperty in interface ClientMessageputDoubleProperty in interface MessageputDoubleProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putStringProperty(SimpleString key, SimpleString value)
MessageputStringProperty in interface ClientMessageputStringProperty in interface MessageputStringProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException
MessageputObjectProperty in interface MessageputObjectProperty in class MessageImplkey - property namevalue - property valueActiveMQPropertyConversionException - if the value is not one of the accepted property
types.public ClientMessageImpl putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException
putObjectProperty in interface MessageputObjectProperty in class MessageImplActiveMQPropertyConversionExceptionMessage.putObjectProperty(SimpleString, Object)public ClientMessageImpl putBooleanProperty(String key, boolean value)
ClientMessageMessage to enable fluent APIputBooleanProperty in interface ClientMessageputBooleanProperty in interface MessageputBooleanProperty in class MessageImplMessage.putBooleanProperty(SimpleString, boolean)public ClientMessageImpl putByteProperty(String key, byte value)
ClientMessageMessage to enable fluent APIputByteProperty in interface ClientMessageputByteProperty in interface MessageputByteProperty in class MessageImplMessage.putByteProperty(SimpleString, byte)public ClientMessageImpl putBytesProperty(String key, byte[] value)
ClientMessageMessage to enable fluent APIputBytesProperty in interface ClientMessageputBytesProperty in interface MessageputBytesProperty in class MessageImplMessage.putBytesProperty(SimpleString, byte[])public ClientMessageImpl putShortProperty(String key, short value)
ClientMessageMessage to enable fluent APIputShortProperty in interface ClientMessageputShortProperty in interface MessageputShortProperty in class MessageImplMessage.putShortProperty(SimpleString, short)public ClientMessageImpl putIntProperty(String key, int value)
ClientMessageMessage to enable fluent APIputIntProperty in interface ClientMessageputIntProperty in interface MessageputIntProperty in class MessageImplMessage.putIntProperty(SimpleString, int)public ClientMessageImpl putLongProperty(String key, long value)
ClientMessageMessage to enable fluent APIputLongProperty in interface ClientMessageputLongProperty in interface MessageputLongProperty in class MessageImplMessage.putLongProperty(SimpleString, long)public ClientMessageImpl putFloatProperty(String key, float value)
ClientMessageMessage to enable fluent APIputFloatProperty in interface ClientMessageputFloatProperty in interface MessageputFloatProperty in class MessageImplMessage.putFloatProperty(SimpleString, float)public ClientMessageImpl putDoubleProperty(String key, double value)
ClientMessageMessage to enable fluent APIputDoubleProperty in interface ClientMessageputDoubleProperty in interface MessageputDoubleProperty in class MessageImplMessage.putDoubleProperty(SimpleString, double)public ClientMessageImpl putStringProperty(String key, String value)
MessageputStringProperty in interface ClientMessageputStringProperty in interface MessageputStringProperty in class MessageImplkey - property namevalue - property valuepublic ClientMessageImpl writeBodyBufferBytes(byte[] bytes)
MessagewriteBodyBufferBytes in interface ClientMessagewriteBodyBufferBytes in interface MessagewriteBodyBufferBytes in class MessageImplpublic ClientMessageImpl writeBodyBufferString(String string)
MessagewriteBodyBufferString in interface ClientMessagewriteBodyBufferString in interface MessagewriteBodyBufferString in class MessageImplCopyright © 2018 JBoss by Red Hat. All rights reserved.