|
Joram 5.0.7 | ||||||||
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 charaterized 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). |
Message |
msg
|
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. |
long |
getExpiration()
Returns the message expiration time. |
java.lang.String |
getIdentifier()
Returns the message identifier. |
boolean |
getPersistent()
Returns true if the message is persistent. |
int |
getPriority()
Returns the message priority. |
long |
getTimestamp()
Returns the message time stamp. |
java.lang.String |
getTxName()
|
int |
getType()
Returns the message type. |
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 |
save()
|
void |
setCorrelationId(java.lang.String correlationId)
Sets the message correlation identifier. |
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 |
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 transient long order
public transient int acksCounter
public transient int durableAcksCounter
public transient Message msg
Constructor Detail |
---|
public Message(Message msg)
Message
instance.
Method Detail |
---|
public void setIdentifier(java.lang.String id)
public void setPersistent(boolean persistent)
public void setPriority(int priority)
priority
- Priority value: 0 the lowest, 9 the highest, 4 normal.public void setExpiration(long expiration)
expiration
- The expiration time.public void setTimestamp(long timestamp)
public void setCorrelationId(java.lang.String correlationId)
public int getType()
public java.lang.String getIdentifier()
public boolean getPersistent()
true
if the message is persistent.
public int getPriority()
public long getExpiration()
public long getTimestamp()
public final java.lang.String getCorrelationId()
public void setObjectProperty(java.lang.String name, java.lang.Object value) throws MessageException
name
- The property name.value
- The property value.
MessageROException
- If the message properties are read-only.
MessageValueException
- If the value is not a Java primitive object.
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.
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 delete()
public static java.util.Vector loadAll(java.lang.String msgTxname)
public static void deleteAll(java.lang.String msgTxname)
|
Joram 5.0.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |