Class LdapMessage
java.lang.Object
org.forgerock.opendj.ldap.messages.LdapMessage
Encapsulates a 
ProtocolOp with LDAP specific message information.- 
Method SummaryModifier and TypeMethodDescriptionintReturns the message-id.Returns the protocol-op contained in this message.byteReturns the protocol-op type.static LdapMessagenewLdapMessage(int messageId, byte protocolOpType, ProtocolOp protocolOp) Creates a newProtocolOpcontaining a fully decoded LDAP message.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.toString()
- 
Method Details- 
newLdapMessageCreates a newProtocolOpcontaining a fully decoded LDAP message.- Parameters:
- messageId- Unique identifier of this message
- protocolOpType- Type of protocol-op contained in this message
- protocolOp- The fully decoded- ProtocolOp
- Returns:
- A new LdapMessage
 
- 
newRequestMessageBuilds and returns anLdapMessagecontaining aRequest.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpTypefrom the actual type ofrequest.- Parameters:
- messageId- Identifier of this message
- request- The fully decoded- Request
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aResponse.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpTypefrom the actual type ofrequestthisresponserespond to.- Parameters:
- messageId- Identifier of this message
- forRequest- The- Requestthe- responseis responding to.
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aSearchResultEntry.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
- messageId- Identifier of this message
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aSearchResultReference.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
- messageId- Identifier of this message
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aIntermediateResponse.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
- messageId- Identifier of this message
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aBindResult.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
- messageId- Identifier of this message
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aExtendedResult.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
- messageId- Identifier of this message
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newResponseMessageBuilds and returns anLdapMessagecontaining aCompareResult.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by inferring theprotocolOpType.- Parameters:
- messageId- Identifier of this message
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
newSearchResultDoneMessageBuilds and returns anLdapMessagefor a search result done operation type.
 This method simplifiesnewLdapMessage(int, byte, ProtocolOp)by removing theprotocolOpTypeparameter when it can be inferred from the actual type ofprotocolOp.- Parameters:
- messageId- Unique identifier of this message
- result- The search result done result
- Returns:
- a new LdapMessage
 
- 
getMessageIdpublic int getMessageId()Returns the message-id.- Returns:
- The message-id
 
- 
getProtocolOpTypepublic byte getProtocolOpType()Returns the protocol-op type.- Returns:
- the protocol-op type
 
- 
getProtocolOpReturns the protocol-op contained in this message.- Returns:
- the ProtocolOp
 
- 
newResponseMessageReturns a newLdapMessagecontaining the providedResponse.- Parameters:
- response- The response which will be contained in the returned message
- Returns:
- a new LdapMessage
 
- 
toString
 
-