org.apache.directory.ldap.client.api.message
Interface Message

All Known Subinterfaces:
AbandonableRequest, Request, RequestWithResponse, Response, ResponseWithResult, SearchResponse
All Known Implementing Classes:
AbandonRequest, AbstractMessage, AbstractRequest, AbstractResponseWithResult, AddRequest, AddResponse, BindRequest, BindResponse, CompareRequest, CompareResponse, DeleteRequest, DeleteResponse, ExtendedIntermediateResponse, ExtendedRequest, ExtendedResponse, ModifyDnRequest, ModifyDnResponse, ModifyRequest, ModifyResponse, SearchIntermediateResponse, SearchRequest, SearchResultDone, SearchResultEntry, SearchResultReference, UnbindRequest

public interface Message

Root interface for all LDAP message type interfaces.

Author:
Apache Directory Project

Method Summary
 Message add(org.apache.directory.shared.ldap.message.control.Control... controls)
          Adds controls to this Message.
 org.apache.directory.shared.ldap.message.control.Control getControl(java.lang.String oid)
          Gets the control with a specific OID.
 java.util.Map<java.lang.String,org.apache.directory.shared.ldap.message.control.Control> getControls()
          Gets the controls associated with this message mapped by OID.
 int getMessageId()
          Get the request messageId
 boolean hasControl(java.lang.String oid)
          Checks whether or not this message has the specified control.
 Message remove(org.apache.directory.shared.ldap.message.control.Control... control)
          Deletes controls, removing them from this Message.
 void setMessageId(int messageId)
          Set the request message ID
 

Method Detail

getMessageId

int getMessageId()
Get the request messageId

Returns:
The request message ID

setMessageId

void setMessageId(int messageId)
Set the request message ID

Parameters:
messageId - The request message ID

getControls

java.util.Map<java.lang.String,org.apache.directory.shared.ldap.message.control.Control> getControls()
Gets the controls associated with this message mapped by OID.

Returns:
Map of OID strings to Control object instances.
See Also:
Control

getControl

org.apache.directory.shared.ldap.message.control.Control getControl(java.lang.String oid)
Gets the control with a specific OID.

Returns:
The Control with the specified OID
See Also:
Control

hasControl

boolean hasControl(java.lang.String oid)
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

add

Message add(org.apache.directory.shared.ldap.message.control.Control... controls)
Adds controls to this Message.

Parameters:
controls - the controls to add.

remove

Message remove(org.apache.directory.shared.ldap.message.control.Control... control)
               throws LdapException
Deletes controls, removing them from this Message.

Parameters:
controls - the controls to remove.
Throws:
LdapException - if controls cannot be added to this Message or the control is not known etc.


Copyright © 2009-2011 Apache Software Foundation. All Rights Reserved.