org.exolab.jms.message
Class MessageId

java.lang.Object
  extended by org.exolab.jms.message.MessageId
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, Identifiable

public final class MessageId
extends java.lang.Object
implements java.io.Externalizable, Identifiable

The MessageId is a serializable object that uniquely identifies a message

Version:
$Revision: 1.8 $ $Date: 2003/08/07 13:33:01 $
Author:
Jim Alateras
See Also:
Serialized Form

Field Summary
static java.lang.String PREFIX
          The JMS message identifier prefix
 
Constructor Summary
MessageId()
          Constructor provided for serialization
MessageId(java.lang.String id)
          Construct a new MessageId
 
Method Summary
static java.lang.String create()
          Allocate a new globally unique message identifier
 boolean equals(java.lang.Object object)
           
 java.lang.String getId()
          Return the identity of the object
static java.lang.String getNull()
          Return the 'null' JMSMessageID.
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
           
 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

PREFIX

public static final java.lang.String PREFIX
The JMS message identifier prefix

See Also:
Constant Field Values
Constructor Detail

MessageId

public MessageId()
Constructor provided for serialization


MessageId

public MessageId(java.lang.String id)
Construct a new MessageId

Parameters:
id - - the message identity
Method Detail

getId

public java.lang.String getId()
Description copied from interface: Identifiable
Return the identity of the object

Specified by:
getId in interface Identifiable
Returns:
the object identity

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

create

public static java.lang.String create()
Allocate a new globally unique message identifier

Returns:
a globally unique message identifier

getNull

public static java.lang.String getNull()
Return the 'null' JMSMessageID. This is the first Id recognised by OpenJMS, but not assigned to messages.

Returns:
String the 'null' message Id


Copyright © 1999-2005 The OpenJMS Group. All Rights Reserved.