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_IDS, messageID, priority, properties, timestamp, typeBYTES_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| Constructor and Description |
|---|
ClientMessageImpl() |
ClientMessageImpl(byte type,
boolean durable,
long expiration,
long timestamp,
byte priority,
int initialMessageBufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
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
|
void |
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) |
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)
Sets the delivery count for this message.
|
void |
setFlowControlSize(int flowControlSize)
Size used for FlowControl
|
void |
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.
|
bodyChanged, checkCompletion, checkCopy, containsProperty, containsProperty, copyHeadersAndProperties, createBody, decode, decodeFromBuffer, decodeHeadersAndProperties, encode, encodeHeadersAndProperties, getAddress, getBodyBuffer, getBodyBufferCopy, 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, isDurable, isExpired, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putTypedProperties, removeProperty, removeProperty, resetCopied, setAddress, setAddressTransient, setDurable, setExpiration, setPriority, setTimestamp, setType, setUserID, toMapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcheckCompletionbodyChanged, checkCopy, decodeFromBuffer, decodeHeadersAndProperties, encodeHeadersAndProperties, getEncodedBuffer, getEndOfBodyPosition, getEndOfMessagePosition, getHeadersAndPropertiesEncodeSize, getTypedProperties, getWholeBuffer, resetCopied, setAddressTransientcontainsProperty, 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, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, removeProperty, removeProperty, setAddress, setDurable, setExpiration, setPriority, setTimestamp, setUserID, toMappublic 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 void setDeliveryCount(int deliveryCount)
ClientMessageThis method is not meant to be called by HornetQ clients.
setDeliveryCount in interface ClientMessagedeliveryCount - message delivery countpublic int getDeliveryCount()
ClientMessagegetDeliveryCount in interface ClientMessagepublic void acknowledge()
throws HornetQException
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 ClientMessageHornetQException - if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()public void individualAcknowledge()
throws HornetQException
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 ClientMessageHornetQException - 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 HornetQException
ClientMessagesaveToOutputStream in interface ClientMessageHornetQExceptionpublic void setOutputStream(OutputStream out) throws HornetQException
ClientMessagesetOutputStream in interface ClientMessageHornetQExceptionpublic boolean waitOutputStreamCompletion(long timeMilliseconds)
throws HornetQException
ClientMessagewaitOutputStreamCompletion in interface ClientMessagetimeMilliseconds - - 0 means wait foreverHornetQExceptionpublic void discardBody()
ClientMessageInternaldiscardBody in interface ClientMessageInternalpublic InputStream getBodyInputStream()
getBodyInputStream in interface MessageInternalpublic void setBodyInputStream(InputStream bodyInputStream)
ClientMessagesetBodyInputStream in interface ClientMessagebodyInputStream - the bodyInputStream to setpublic BodyEncoder getBodyEncoder() throws HornetQException
getBodyEncoder in interface MessageInternalgetBodyEncoder in class MessageImplHornetQExceptionCopyright © 2013 JBoss, a division of Red Hat. All rights reserved.