com.novell.ldap.rfc2251
Class RfcMessageID
java.lang.Object
com.novell.ldap.asn1.ASN1Object
com.novell.ldap.asn1.ASN1Numeric
com.novell.ldap.asn1.ASN1Integer
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
messageID
private static int messageID
lock
private static java.lang.Object lock
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.
getMessageID
private static final int getMessageID()
- Increments the message number atomically
- Returns:
- the new message number
Copyright ? 2002 Novell, Inc. All Rights Reserved.
Novell, Inc.
1800 South Novell Place
Provo, Ut 84606
Phone: (801) 861-5000