public class ClientMessageImpl extends CoreMessage implements ClientMessageInternal
| Modifier and Type | Field and Description |
|---|---|
static SimpleString |
REPLYTO_HEADER_NAME |
address, BODY_OFFSET, buffer, BUFFER_HEADER_SPACE, durable, endOfBodyPosition, messageID, messageIDPosition, priority, properties, timestamp, type, writableBufferBYTES_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 | Constructor and Description |
|---|---|
|
ClientMessageImpl() |
|
ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize) |
|
ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize,
CoreMessageObjectPools coreMessageObjectPools) |
protected |
ClientMessageImpl(ClientMessageImpl other) |
|
ClientMessageImpl(CoreMessageObjectPools coreMessageObjectPools) |
| Modifier and Type | Method and Description |
|---|---|
ClientMessageImpl |
acknowledge()
Acknowledges reception of this message.
|
void |
checkCompletion()
This can be optionally used to verify if the entire message has been received.
|
Message |
copy()
It will generate a new instance of the message encode, being a deep copy, new properties, new everything
|
void |
discardBody()
Discard unused packets (used on large-message)
|
LargeBodyEncoder |
getBodyEncoder() |
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.
|
int |
getFlowControlSize()
Size used for FlowControl
|
TypedProperties |
getProperties() |
ClientMessageImpl |
individualAcknowledge()
Acknowledges reception of a single message.
|
boolean |
isCompressed() |
boolean |
isLargeMessage() |
void |
onReceipt(ClientConsumerInternal consumer) |
ClientMessageImpl |
putBooleanProperty(SimpleString key,
boolean value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putBooleanProperty(String key,
boolean value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putByteProperty(SimpleString key,
byte value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putByteProperty(String key,
byte value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putBytesProperty(SimpleString key,
byte[] value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putBytesProperty(String key,
byte[] value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putCharProperty(SimpleString key,
char value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putCharProperty(String key,
char value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putDoubleProperty(SimpleString key,
double value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putDoubleProperty(String key,
double value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putFloatProperty(SimpleString key,
float value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putFloatProperty(String key,
float value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putIntProperty(SimpleString key,
int value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putIntProperty(String key,
int value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putLongProperty(SimpleString key,
long value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putLongProperty(String key,
long value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putObjectProperty(SimpleString key,
Object value) |
ClientMessageImpl |
putObjectProperty(String key,
Object value) |
ClientMessageImpl |
putShortProperty(SimpleString key,
short value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putShortProperty(String key,
short value)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
putStringProperty(SimpleString key,
SimpleString value) |
ClientMessageImpl |
putStringProperty(SimpleString key,
String value) |
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.
|
ClientMessageImpl |
setDurable(boolean durable)
Sets whether this message is durable or not.
|
ClientMessageImpl |
setExpiration(long expiration)
Sets the expiration of 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.
|
ClientMessageImpl |
setPriority(byte priority)
Sets the message priority.
|
ClientMessageImpl |
setUserID(UUID userID) |
String |
toString() |
boolean |
waitOutputStreamCompletion(long timeMilliseconds)
Wait the outputStream completion of the message.
|
ClientMessageImpl |
writeBodyBufferBytes(byte[] bytes)
Overridden from
Message to enable fluent API |
ClientMessageImpl |
writeBodyBufferString(String string)
Overridden from
Message to enable fluent API |
checkEncode, checkProperties, cleanupInternalProperties, containsProperty, containsProperty, copy, copyHeadersAndProperties, decodeHeadersAndProperties, encode, encodeHeadersAndProperties, getAddress, getAddressSimpleString, getAnnotation, getBodyBuffer, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDataBuffer, getDoubleProperty, getDoubleProperty, getDuplicateProperty, getEncodeSize, getEndOfBodyPosition, getExpiration, getFloatProperty, getFloatProperty, getGroupID, getHeadersAndPropertiesEncodeSize, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMemoryEstimate, getMessageID, getObjectProperty, getObjectProperty, getPersistentSize, getPersister, getPersistSize, getPriority, getPropertyNames, getReadOnlyBodyBuffer, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getTypedProperties, getUserID, getValidatedUserID, initBuffer, isDurable, isServerMessage, messageChanged, persist, receiveBuffer_1X, receiveBuffer, reloadPersistence, removeAnnotation, removeProperty, removeProperty, sendBuffer_1X, sendBuffer, setAddress, setAddress, setBuffer, setLastValueProperty, setMessageID, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setType, setUserID, setValidatedUserID, toCore, toCoredecrementDurableRefCount, decrementRefCount, getContext, getRefCount, incrementDurableRefCount, incrementRefCount, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetBodyBuffercopyHeadersAndProperties, getDataBuffer, getEndOfBodyPosition, getHeadersAndPropertiesEncodeSize, getReadOnlyBodyBuffer, getType, isServerMessage, receiveBuffer_1X, sendBuffer_1X, setType, toMapacceptsConsumer, cleanupInternalProperties, containsProperty, containsProperty, 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, messageChanged, persist, putExtraBytesProperty, receiveBuffer, reencode, referenceOriginalMessage, rejectConsumer, releaseBuffer, reloadPersistence, removeAnnotation, removeExtraBytesProperty, removeProperty, removeProperty, sendBuffer, setAddress, setAddress, setAnnotation, setBuffer, setConnectionID, setContext, setLastValueProperty, setMessageID, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, setValidatedUserID, toCore, toCore, toPropertyMappublic static final SimpleString REPLYTO_HEADER_NAME
public ClientMessageImpl()
public ClientMessageImpl(CoreMessageObjectPools coreMessageObjectPools)
protected ClientMessageImpl(ClientMessageImpl other)
public ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize,
CoreMessageObjectPools coreMessageObjectPools)
public ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize)
public ClientMessageImpl setDurable(boolean durable)
MessagesetDurable in interface MessagesetDurable in class CoreMessagedurable - true to flag this message as durable, false elsepublic ClientMessageImpl setExpiration(long expiration)
MessagesetExpiration in interface MessagesetExpiration in class CoreMessageexpiration - expiration timepublic ClientMessageImpl setPriority(byte priority)
MessageValue must be between 0 and 9 inclusive.
setPriority in interface MessagesetPriority in class CoreMessagepriority - the new message prioritypublic ClientMessageImpl setUserID(UUID userID)
setUserID in class CoreMessagepublic TypedProperties getProperties()
getProperties in interface ClientMessageInternalpublic 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 void checkCompletion()
throws ActiveMQException
ClientMessagecheckCompletion in interface ClientMessageActiveMQExceptionpublic int getFlowControlSize()
ClientMessageInternalgetFlowControlSize in interface ClientMessageInternalpublic void setFlowControlSize(int flowControlSize)
ClientMessageInternalsetFlowControlSize in interface ClientMessageInternalpublic boolean isLargeMessage()
isLargeMessage in interface MessageisLargeMessage in class CoreMessagepublic boolean isCompressed()
isCompressed in interface ClientMessageInternalpublic int getBodySize()
ClientMessagegetBodySize in interface ClientMessagepublic String toString()
toString in class CoreMessagepublic 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()
ClientMessagegetBodyInputStream in interface ClientMessagegetBodyInputStream in interface ICoreMessagegetBodyInputStream in interface MessagegetBodyInputStream in class CoreMessagepublic ClientMessageImpl setBodyInputStream(InputStream bodyInputStream)
ClientMessagesetBodyInputStream in interface ClientMessagebodyInputStream - the bodyInputStream to setpublic LargeBodyEncoder getBodyEncoder() throws ActiveMQException
getBodyEncoder in interface ICoreMessagegetBodyEncoder in class CoreMessageActiveMQExceptionpublic ClientMessageImpl putBooleanProperty(SimpleString key, boolean value)
ClientMessageMessage to enable fluent APIputBooleanProperty in interface ClientMessageputBooleanProperty in interface MessageputBooleanProperty in class CoreMessagepublic ClientMessageImpl putByteProperty(SimpleString key, byte value)
ClientMessageMessage to enable fluent APIputByteProperty in interface ClientMessageputByteProperty in interface MessageputByteProperty in class CoreMessagepublic ClientMessageImpl putBytesProperty(SimpleString key, byte[] value)
ClientMessageMessage to enable fluent APIputBytesProperty in interface ClientMessageputBytesProperty in interface MessageputBytesProperty in class CoreMessagepublic ClientMessageImpl putCharProperty(SimpleString key, char value)
ClientMessageMessage to enable fluent APIputCharProperty in interface ClientMessageputCharProperty in interface MessageputCharProperty in class CoreMessagepublic ClientMessageImpl putCharProperty(String key, char value)
ClientMessageMessage to enable fluent APIputCharProperty in interface ClientMessageputCharProperty in interface MessageputCharProperty in class CoreMessagepublic ClientMessageImpl putShortProperty(SimpleString key, short value)
ClientMessageMessage to enable fluent APIputShortProperty in interface ClientMessageputShortProperty in interface MessageputShortProperty in class CoreMessagepublic ClientMessageImpl putIntProperty(SimpleString key, int value)
ClientMessageMessage to enable fluent APIputIntProperty in interface ClientMessageputIntProperty in interface MessageputIntProperty in class CoreMessagepublic ClientMessageImpl putLongProperty(SimpleString key, long value)
ClientMessageMessage to enable fluent APIputLongProperty in interface ClientMessageputLongProperty in interface MessageputLongProperty in class CoreMessagepublic ClientMessageImpl putFloatProperty(SimpleString key, float value)
ClientMessageMessage to enable fluent APIputFloatProperty in interface ClientMessageputFloatProperty in interface MessageputFloatProperty in class CoreMessagepublic ClientMessageImpl putDoubleProperty(SimpleString key, double value)
ClientMessageMessage to enable fluent APIputDoubleProperty in interface ClientMessageputDoubleProperty in interface MessageputDoubleProperty in class CoreMessagepublic ClientMessageImpl putStringProperty(SimpleString key, SimpleString value)
putStringProperty in interface MessageputStringProperty in class CoreMessagepublic ClientMessageImpl putStringProperty(SimpleString key, String value)
putStringProperty in interface MessageputStringProperty in class CoreMessagepublic ClientMessageImpl putObjectProperty(SimpleString key, Object value) throws ActiveMQPropertyConversionException
putObjectProperty in interface MessageputObjectProperty in class CoreMessageActiveMQPropertyConversionExceptionpublic ClientMessageImpl putObjectProperty(String key, Object value) throws ActiveMQPropertyConversionException
putObjectProperty in interface MessageputObjectProperty in class CoreMessageActiveMQPropertyConversionExceptionpublic ClientMessageImpl putBooleanProperty(String key, boolean value)
ClientMessageMessage to enable fluent APIputBooleanProperty in interface ClientMessageputBooleanProperty in interface MessageputBooleanProperty in class CoreMessagepublic ClientMessageImpl putByteProperty(String key, byte value)
ClientMessageMessage to enable fluent APIputByteProperty in interface ClientMessageputByteProperty in interface MessageputByteProperty in class CoreMessagepublic ClientMessageImpl putBytesProperty(String key, byte[] value)
ClientMessageMessage to enable fluent APIputBytesProperty in interface ClientMessageputBytesProperty in interface MessageputBytesProperty in class CoreMessagepublic ClientMessageImpl putShortProperty(String key, short value)
ClientMessageMessage to enable fluent APIputShortProperty in interface ClientMessageputShortProperty in interface MessageputShortProperty in class CoreMessagepublic ClientMessageImpl putIntProperty(String key, int value)
ClientMessageMessage to enable fluent APIputIntProperty in interface ClientMessageputIntProperty in interface MessageputIntProperty in class CoreMessagepublic ClientMessageImpl putLongProperty(String key, long value)
ClientMessageMessage to enable fluent APIputLongProperty in interface ClientMessageputLongProperty in interface MessageputLongProperty in class CoreMessagepublic ClientMessageImpl putFloatProperty(String key, float value)
ClientMessageMessage to enable fluent APIputFloatProperty in interface ClientMessageputFloatProperty in interface MessageputFloatProperty in class CoreMessagepublic ClientMessageImpl putDoubleProperty(String key, double value)
ClientMessageMessage to enable fluent APIputDoubleProperty in interface ClientMessageputDoubleProperty in interface MessageputDoubleProperty in class CoreMessagepublic ClientMessageImpl putStringProperty(String key, String value)
MessageputStringProperty in interface ClientMessageputStringProperty in interface MessageputStringProperty in class CoreMessagekey - property namevalue - property valuepublic ClientMessageImpl writeBodyBufferBytes(byte[] bytes)
ClientMessageMessage to enable fluent APIwriteBodyBufferBytes in interface ClientMessagepublic ClientMessageImpl writeBodyBufferString(String string)
ClientMessageMessage to enable fluent APIwriteBodyBufferString in interface ClientMessageCopyright © 2019 JBoss by Red Hat. All rights reserved.