Interface Message
- All Known Subinterfaces:
AbandonableRequest, AbandonRequest, AddRequest, AddResponse, BindRequest, BindResponse, CompareRequest, CompareResponse, DeleteRequest, DeleteResponse, ExtendedRequest, ExtendedResponse, IntermediateResponse, ManyReplyRequest, ModifyDnRequest, ModifyDnResponse, ModifyRequest, ModifyResponse, Request, Response, ResultResponse, ResultResponseRequest, SearchRequest, SearchResultDone, SearchResultEntry, SearchResultReference, SingleReplyRequest, UnbindRequest
- All Known Implementing Classes:
AbandonRequestImpl, AbstractAbandonableRequest, AbstractExtendedRequest, AbstractExtendedResponse, AbstractMessage, AbstractRequest, AbstractResponse, AbstractResultResponse, AddNoDResponse, AddRequestImpl, AddResponseImpl, BindNoDResponse, BindRequestImpl, BindResponseImpl, CompareNoDResponse, CompareRequestImpl, CompareResponseImpl, DeleteNoDResponse, DeleteRequestImpl, DeleteResponseImpl, ExtendedNoDResponse, IntermediateResponseImpl, ModifyDnNoDResponse, ModifyDnRequestImpl, ModifyDnResponseImpl, ModifyNoDResponse, ModifyRequestImpl, ModifyResponseImpl, NoticeOfDisconnect, OpaqueExtendedRequest, OpaqueExtendedResponse, SearchNoDResponse, SearchRequestImpl, SearchResultDoneImpl, SearchResultEntryImpl, SearchResultReferenceImpl, UnbindRequestImpl
public interface Message
Root interface for all LDAP message type interfaces.
- Author:
- Apache Directory Project
-
Method Summary
Modifier and TypeMethodDescriptionaddAllControls(Control[] controlsToAdd) Adds an array of controls to this Message.addControl(Control control) Adds a control to this Message.Gets a message scope parameter.getControl(String oid) Gets the control associated with the given OID.Gets the controls associated with this message mapped by OID.intGets the session unique message sequence id for this message.getType()Gets the LDAP message type code associated with this Message.booleanhasControl(String oid) Checks whether or not this message has the specified control.Sets a message scope parameter.removeControl(Control control) Deletes a control removing it from this Message.setMessageId(int messageId) Sets the Message ID for this request
-
Method Details
-
getType
MessageTypeEnum getType()Gets the LDAP message type code associated with this Message. Each request and response type has a unique message type code defined by the protocol in RFC 2251.- Returns:
- the message type code.
-
getControls
-
getControl
-
hasControl
Checks whether or not this message has the specified control.- Parameters:
oid- the OID of the control- Returns:
- true if this message has the control, false if it does not
-
addControl
-
addAllControls
-
removeControl
-
getMessageId
int getMessageId()Gets the session unique message sequence id for this message. Requests and their responses if any have the same message id. Clients at the initialization of a session start with the first message's id set to 1 and increment it with each transaction.- Returns:
- the session unique message id.
-
get
Gets a message scope parameter. Message scope parameters are temporary variables associated with a message and are set locally to be used to associate housekeeping information with a request or its processing. These parameters are never transmitted nor recieved, think of them as transient data associated with the message or its processing. These transient parameters are not locked down so modifications can occur without firing LockExceptions even when this Lockable is in the locked state.- Parameters:
key- the key used to access a message parameter.- Returns:
- the transient message parameter value.
-
put
Sets a message scope parameter. These transient parameters are not locked down so modifications can occur without firing LockExceptions even when this Lockable is in the locked state.- Parameters:
key- the parameter keyvalue- the parameter value- Returns:
- the old value or null
-
setMessageId
Sets the Message ID for this request- Parameters:
messageId- The message Id- Returns:
- A Message reference
-