Package org.ldaptive
Class AbstractMessage
java.lang.Object
org.ldaptive.AbstractMessage
- All Implemented Interfaces:
Message
- Direct Known Subclasses:
AbstractResult,IntermediateResponse,LdapEntry,SearchResultReference
LDAP message envelope defined as:
LDAPMessage ::= SEQUENCE {
messageID MessageID,
protocolOp CHOICE {
...,
controls [0] Controls OPTIONAL }
Control ::= SEQUENCE {
controlType LDAPOID,
criticality BOOLEAN DEFAULT FALSE,
controlValue OCTET STRING OPTIONAL }
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAbstractMessage.AbstractBuilder<B,T extends AbstractMessage> protected static classParses a buffer containing an LDAP control.protected static classParse handler implementation for the message controls.protected static classParse handler implementation for the message ID. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<ResponseControl>LDAP controls.private intProtocol message ID. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddControls(ResponseControl... cntrls) Adds the supplied controls to this message.protected <T extends Message>
voidcopyValues(T message) Copies the property values from the supplied message to this message.booleanfinal booleanequalsMessage(Message message) Returns whether the base properties of this message are equal.final ResponseControl[]Returns the response controls for this message.final intReturns the ID for this message.abstract inthashCode()Returns the hash code for this object.protected voidsetMessageID(int id) Sets the message ID.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.Message
getControl
-
Field Details
-
controls
LDAP controls. -
messageID
private int messageIDProtocol message ID.
-
-
Constructor Details
-
AbstractMessage
public AbstractMessage()
-
-
Method Details
-
getMessageID
public final int getMessageID()Description copied from interface:MessageReturns the ID for this message.- Specified by:
getMessageIDin interfaceMessage- Returns:
- message ID
-
setMessageID
protected void setMessageID(int id) Sets the message ID.- Parameters:
id- of the message
-
getControls
Description copied from interface:MessageReturns the response controls for this message.- Specified by:
getControlsin interfaceMessage- Returns:
- response controls
-
addControls
Adds the supplied controls to this message.- Parameters:
cntrls- to add
-
copyValues
Copies the property values from the supplied message to this message.- Type Parameters:
T- type of message- Parameters:
message- to copy from
-
equalsMessage
Returns whether the base properties of this message are equal. Those include message ID and controls.- Parameters:
message- to compare- Returns:
- whether message properties are equal
-
equals
-
hashCode
public abstract int hashCode()Returns the hash code for this object. -
toString
-