|
Joram 5.3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.mom.messages.Message
public final class Message
The Message
class actually provides the transport facility
for the data exchanged during MOM operations.
A message content is always wrapped as a bytes array, it is characterized by properties and "header" fields.
Field Summary | |
---|---|
int |
acksCounter
The number of acknowledgements a message still expects from its subscribers before having been fully consumed by them (field used by JMS proxies). |
int |
durableAcksCounter
The number of acknowledgements a message still expects from its durable subscribers before having been fully consumed by them (field used by JMS proxies). |
static org.objectweb.util.monolog.api.Logger |
logger
logger |
long |
order
Arrival position of this message on its queue or proxy. |
Constructor Summary | |
---|---|
Message(Message msg)
Constructs a Message instance. |
Method Summary | |
---|---|
void |
delete()
|
static void |
deleteAll(java.lang.String msgTxname)
Deletes all persisted objects. |
java.lang.String |
getCorrelationId()
Returns the message correlation identifier. |
int |
getDeliveryCount()
Returns the message delivery count. |
long |
getExpiration()
Returns the message expiration time. |
Message |
getFullMessage()
Returns the contained message with body. |
Message |
getHeaderMessage()
Returns the contained message eventually without the body. |
java.lang.String |
getIdentifier()
Returns the message identifier. |
int |
getPriority()
Returns the message priority. |
long |
getTimestamp()
Returns the message time stamp. |
java.lang.String |
getTxName()
|
int |
getType()
Returns the message type. |
void |
incDeliveryCount()
Increments the message delivery count. |
boolean |
isPersistent()
Returns true if the message is persistent. |
boolean |
isValid(long currentTime)
Returns true if the message is valid. |
static Message |
load(java.lang.String txname)
|
static java.util.Vector |
loadAll(java.lang.String msgTxname)
Loads all persisted messages. |
void |
releaseFullMessage()
Creates a soft reference instead of a hard one linking to the body of the contained message. |
void |
save()
|
void |
saveHeader()
|
void |
setCorrelationId(java.lang.String correlationId)
Sets the message correlation identifier. |
void |
setDeliveryCount(int deliveryCount)
Sets the message delivery count. |
void |
setExpiration(long expiration)
Sets the message expiration. |
void |
setIdentifier(java.lang.String id)
Sets the message identifier. |
void |
setObjectProperty(java.lang.String name,
java.lang.Object value)
Sets a property value. |
void |
setPersistent(boolean persistent)
Sets the message persistence mode. |
void |
setPriority(int priority)
Sets the message priority. |
void |
setRedelivered()
Sets the message redelivered flag. |
void |
setTimestamp(long timestamp)
Sets the message time stamp. |
void |
setTxName(java.lang.String txname)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static org.objectweb.util.monolog.api.Logger logger
public transient long order
public transient int acksCounter
public transient int durableAcksCounter
Constructor Detail |
---|
public Message(Message msg)
Message
instance.
Method Detail |
---|
public Message getHeaderMessage()
public Message getFullMessage()
public void releaseFullMessage()
public int getType()
public java.lang.String getIdentifier()
public void setIdentifier(java.lang.String id)
public boolean isPersistent()
true
if the message is persistent.
public void setPersistent(boolean persistent)
public int getPriority()
public void setPriority(int priority)
priority
- Priority value: 0 the lowest, 9 the highest, 4 normal.public long getExpiration()
public void setExpiration(long expiration)
expiration
- The expiration time.public long getTimestamp()
public void setTimestamp(long timestamp)
public final java.lang.String getCorrelationId()
public void setCorrelationId(java.lang.String correlationId)
public int getDeliveryCount()
public void setDeliveryCount(int deliveryCount)
public void incDeliveryCount()
public void setRedelivered()
public void setObjectProperty(java.lang.String name, java.lang.Object value) throws MessageException
name
- The property name.value
- The property value.
java.lang.IllegalArgumentException
- If the key name is illegal (null or empty string).
MessageException
public boolean isValid(long currentTime)
true
if the message is valid. The message is valid if
not expired.
currentTime
- The current time to verify the expiration time.public void setTxName(java.lang.String txname)
public java.lang.String getTxName()
public static Message load(java.lang.String txname) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void save()
public void saveHeader()
public void delete()
public static java.util.Vector loadAll(java.lang.String msgTxname)
public static void deleteAll(java.lang.String msgTxname)
|
Joram 5.3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |