Record Class LdapMessage
java.lang.Object
java.lang.Record
org.forgerock.opendj.ldap.messages.LdapMessage
- Record Components:
messageId- The LDAP message ID.protocolOpType- The LDAP message type.protocolOp- The LDAP message content.
Encapsulates a
ProtocolOp with LDAP specific message information.-
Constructor Summary
ConstructorsConstructorDescriptionLdapMessage(int messageId, byte protocolOpType, ProtocolOp protocolOp) Creates an instance of aLdapMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themessageIdrecord component.static LdapMessagenewRequestMessage(int messageId, Request request) Builds and returns anLdapMessagecontaining aRequest.static LdapMessagenewResponseMessage(int messageId, BindResult response) Builds and returns anLdapMessagecontaining aBindResult.static LdapMessagenewResponseMessage(int messageId, CompareResult response) Builds and returns anLdapMessagecontaining aCompareResult.static LdapMessagenewResponseMessage(int messageId, ExtendedResult response) Builds and returns anLdapMessagecontaining aExtendedResult.static LdapMessagenewResponseMessage(int messageId, IntermediateResponse response) Builds and returns anLdapMessagecontaining aIntermediateResponse.static LdapMessagenewResponseMessage(int messageId, Request forRequest, Response response) Builds and returns anLdapMessagecontaining aResponse.static LdapMessagenewResponseMessage(int messageId, SearchResultEntry response) Builds and returns anLdapMessagecontaining aSearchResultEntry.static LdapMessagenewResponseMessage(int messageId, SearchResultReference response) Builds and returns anLdapMessagecontaining aSearchResultReference.newResponseMessage(Response response) Returns a newLdapMessagecontaining the providedResponse.static LdapMessagenewSearchResultDoneMessage(int messageId, Result result) Builds and returns anLdapMessagefor a search result done operation type.Returns the value of theprotocolOprecord component.byteReturns the value of theprotocolOpTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LdapMessage
Creates an instance of aLdapMessagerecord class.- Parameters:
messageId- the value for themessageIdrecord componentprotocolOpType- the value for theprotocolOpTyperecord componentprotocolOp- the value for theprotocolOprecord component
-
-
Method Details
-
newRequestMessage
Builds and returns anLdapMessagecontaining aRequest.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpTypefrom the actual type ofrequest.- Parameters:
messageId- Identifier of this messagerequest- The fully decodedRequest- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aResponse.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpTypefrom the actual type ofrequestthisresponserespond to.- Parameters:
messageId- Identifier of this messageforRequest- TheRequesttheresponseis responding to.response- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aSearchResultEntry.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
messageId- Identifier of this messageresponse- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aSearchResultReference.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
messageId- Identifier of this messageresponse- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aIntermediateResponse.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
messageId- Identifier of this messageresponse- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aBindResult.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
messageId- Identifier of this messageresponse- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aExtendedResult.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
messageId- Identifier of this messageresponse- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newResponseMessage
Builds and returns anLdapMessagecontaining aCompareResult.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
messageId- Identifier of this messageresponse- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
newSearchResultDoneMessage
Builds and returns anLdapMessagefor a search result done operation type.
This method simplifiesLdapMessage(int, byte, ProtocolOp)by removing theprotocolOpTypeparameter when it can be inferred from the actual type ofprotocolOp.- Parameters:
messageId- Unique identifier of this messageresult- The search result done result- Returns:
- a new
LdapMessage
-
newResponseMessage
Returns a newLdapMessagecontaining the providedResponse.- Parameters:
response- The response which will be contained in the returned message- Returns:
- a new
LdapMessage
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
messageId
public int messageId()Returns the value of themessageIdrecord component.- Returns:
- the value of the
messageIdrecord component
-
protocolOpType
public byte protocolOpType()Returns the value of theprotocolOpTyperecord component.- Returns:
- the value of the
protocolOpTyperecord component
-
protocolOp
Returns the value of theprotocolOprecord component.- Returns:
- the value of the
protocolOprecord component
-