org.jabber.jabberbeans
Class IdentifierCounter

java.lang.Object
  |
  +--org.jabber.jabberbeans.IdentifierCounter
All Implemented Interfaces:
java.io.Serializable

public class IdentifierCounter
extends java.lang.Object
implements java.io.Serializable

This counter is used to add a unique identifier to outgoing messages, so that the message can be linked to an error message should one be reported by the server. The default value of the counter starts at 0, and is incremented by 1 for each new identifier that is created.

See Also:
Serialized Form

Method Summary
static java.lang.String getNewIdentifier()
          return an identifier for use in creating a message.
static void setValue(int newVal)
          Set the value of the counter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNewIdentifier

public static java.lang.String getNewIdentifier()
return an identifier for use in creating a message.

Returns:
new (unique by session) identifier

setValue

public static void setValue(int newVal)
Set the value of the counter. The next value returned will be newVal + 1.