Package org.ldaptive

Class AbstractMessage

  • All Implemented Interfaces:
    Direct Known Subclasses:
    AbstractResult, IntermediateResponse, LdapEntry, SearchResultReference

    public abstract class AbstractMessage
    extends Object
    implements Message
    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 }
    • Field Detail

      • messageID

        private int messageID
        Protocol message ID.
    • Constructor Detail

      • AbstractMessage

        public AbstractMessage()
    • Method Detail

      • getMessageID

        public int getMessageID()
        Description copied from interface: Message
        Returns the ID for this message.
        Specified by:
        getMessageID in interface Message
        message ID
      • setMessageID

        public void setMessageID​(int id)
      • getControls

        public ResponseControl[] getControls()
        Description copied from interface: Message
        Returns the response controls for this message.
        Specified by:
        getControls in interface Message
        response controls
      • addControls

        public void addControls​(ResponseControl... cntrls)
        Adds the supplied controls to this message.
        cntrls - to add
      • copyValues

        protected <T extends Message> void copyValues​(T message)
        Copies the property values from the supplied message to this message.
        Type Parameters:
        T - type of message
        message - to copy from
      • hashCode

        public abstract int hashCode()
        Returns the hash code for this object.
        hashCode in class Object
        hash code