|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClientMessage
A ClientMessage represents a message sent and/or received by HornetQ.
Field Summary |
---|
Fields inherited from interface org.hornetq.api.core.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_SCHEDULED_DELIVERY_TIME, MAP_TYPE, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE |
Method Summary | |
---|---|
void |
acknowledge()
Acknowledge reception of this message. |
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. |
Method Detail |
---|
int getDeliveryCount()
void setDeliveryCount(int deliveryCount)
deliveryCount
- message delivery countvoid acknowledge() throws org.hornetq.api.core.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.
org.hornetq.api.core.HornetQException
- if an error occurred while acknowledging the message.ClientSession.isAutoCommitAcks()
void individualAcknowledge() throws org.hornetq.api.core.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.
org.hornetq.api.core.HornetQException
- if an error occured while acknowledging the message.ClientSession.isAutoCommitAcks()
int getBodySize()
void setOutputStream(OutputStream out) throws org.hornetq.api.core.HornetQException
org.hornetq.api.core.HornetQException
void saveToOutputStream(OutputStream out) throws org.hornetq.api.core.HornetQException
org.hornetq.api.core.HornetQException
boolean waitOutputStreamCompletion(long timeMilliseconds) throws org.hornetq.api.core.HornetQException
timeMilliseconds
- - 0 means wait forever
org.hornetq.api.core.HornetQException
void setBodyInputStream(InputStream bodyInputStream)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |