All LDAP Classes
Internal LDAP Classes

com.novell.ldap.rfc2251
Class RfcMessageID

java.lang.Object
  extended by com.novell.ldap.asn1.ASN1Object
      extended by com.novell.ldap.asn1.ASN1Numeric
          extended by com.novell.ldap.asn1.ASN1Integer
              extended by com.novell.ldap.rfc2251.RfcMessageID
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RfcAbandonRequest

 class RfcMessageID
extends ASN1Integer

Represents an LDAP Message ID.

       MessageID ::= INTEGER (0 .. maxInt)

       maxInt INTEGER ::= 2147483647 -- (2^^31 - 1) --

 Note: The creation of a MessageID should be hidden within the creation of
       an RfcLDAPMessage. The MessageID needs to be in sequence, and has an
       upper and lower limit. There is never a case when a user should be
       able to specify the MessageID for an RfcLDAPMessage. The MessageID()
       class should be package protected. (So the MessageID value isn't
       arbitrarily run up.)


Field Summary
private static java.lang.Object lock
           
private static int messageID
           
 
Fields inherited from class com.novell.ldap.asn1.ASN1Integer
ID, TAG
 
Constructor Summary
protected RfcMessageID()
          Creates a MessageID with an auto incremented ASN1Integer value.
protected RfcMessageID(int i)
          Creates a MessageID with a specified int value.
 
Method Summary
private static int getMessageID()
          Increments the message number atomically
 
Methods inherited from class com.novell.ldap.asn1.ASN1Integer
encode, toString
 
Methods inherited from class com.novell.ldap.asn1.ASN1Numeric
intValue, longValue
 
Methods inherited from class com.novell.ldap.asn1.ASN1Object
getEncoding, getIdentifier, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

messageID

private static int messageID

lock

private static java.lang.Object lock
Constructor Detail

RfcMessageID

protected RfcMessageID()
Creates a MessageID with an auto incremented ASN1Integer value. Bounds: (0 .. 2,147,483,647) (2^^31 - 1 or Integer.MAX_VALUE) MessageID zero is never used in this implementation. Always start the messages with one.


RfcMessageID

protected RfcMessageID(int i)
Creates a MessageID with a specified int value.

Method Detail

getMessageID

private static final int getMessageID()
Increments the message number atomically

Returns:
the new message number

All LDAP Classes
Internal LDAP Classes

Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000