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 |
---|---|
void |
acknowledge()
Acknowledge reception of this message.
|
void |
checkCompletion()
This can be optionally used to verify if the entire message has been received.
|
int |
getBodySize()
Return the size (in bytes) of this message's body
|
int |
getDeliveryCount()
Returns the number of times this message was delivered.
|
void |
individualAcknowledge()
Acknowledge reception of a single message.
|
void |
saveToOutputStream(OutputStream out)
Saves the content of the message to the OutputStream.
|
void |
setBodyInputStream(InputStream bodyInputStream)
Sets the body's IntputStream.
|
void |
setDeliveryCount(int deliveryCount)
Set the delivery count for this message.
|
void |
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.
|
containsProperty, containsProperty, getAddress, getBodyBuffer, getBodyBufferCopy, 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, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, removeProperty, removeProperty, setAddress, setDurable, setExpiration, setPriority, setTimestamp, setUserID, toMap
int getDeliveryCount()
void setDeliveryCount(int deliveryCount)
deliveryCount
- message delivery countvoid acknowledge() throws HornetQException
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.
HornetQException
- if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()
void individualAcknowledge() throws HornetQException
autoCommitAcks
set to true
, the transaction will automatically commit the current transaction.
Otherwise, this acknwoledgement will not be committed until the client commits the session transaction.HornetQException
- if an error occured while acknowledging the message.ClientSession.isAutoCommitAcks()
void checkCompletion() throws HornetQException
HornetQException
int getBodySize()
void setOutputStream(OutputStream out) throws HornetQException
HornetQException
void saveToOutputStream(OutputStream out) throws HornetQException
HornetQException
boolean waitOutputStreamCompletion(long timeMilliseconds) throws HornetQException
timeMilliseconds
- - 0 means wait foreverHornetQException
void setBodyInputStream(InputStream bodyInputStream)
Copyright © 2018 JBoss by Red Hat. All rights reserved.