|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jrun.jms.core.message.MessageId
The MessageId is a serializable object that uniquely identifies the object
| Field Summary | |
static java.lang.String |
PERSISTENT_PREFIX
The prefix for persistent messages |
static java.lang.String |
PREFIX
The prefix for transient messages |
| Constructor Summary | |
MessageId()
Construct a transient message id |
|
MessageId(int mode)
Construct a message id based on the delivery mode of the message |
|
MessageId(int mode,
long id)
Construct a message id using the specified mode and identity |
|
MessageId(java.lang.String id)
Construct a trnasient id with the specified identity. |
|
| Method Summary | |
boolean |
equals(java.lang.Object object)
|
static java.lang.String |
generatePersistentId(long Id)
Generate a persistent message id from the specified long |
long |
getId()
Return the identity of the object as a long |
java.lang.String |
getIdAsString()
Return the identity of the object as a string |
static java.lang.String |
getNull()
Return the 'null' JMSMessageID. |
int |
hashCode()
|
boolean |
isPersistent()
Check if the message id corresponds to a persistent message. |
void |
readExternal(java.io.ObjectInput in)
|
static long |
stringToLong(java.lang.String messageId)
Convert a JMSMessageID to its long value |
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String PREFIX
public static final java.lang.String PERSISTENT_PREFIX
| Constructor Detail |
public MessageId(int mode)
mode - - delivery modepublic MessageId()
public MessageId(java.lang.String id)
throws javax.jms.JMSException
id - - the message identityJMSException - - thrown if format is invalid
public MessageId(int mode,
long id)
mode - - delivery modeid - - message id as a long| Method Detail |
public boolean isPersistent()
public long getId()
IdentifiablegetId in interface Identifiablejrun.jms.core.Identifiablepublic java.lang.String getIdAsString()
IdentifiablegetIdAsString in interface Identifiablejrun.jms.core.Identifiablepublic int hashCode()
hashCode in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizable
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic static java.lang.String getNull()
public static java.lang.String generatePersistentId(long Id)
Id - numeric representation of the Idpublic static long stringToLong(java.lang.String messageId)
messageId - JMSMessageID to convert
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||