Class AbstractExtendedRequest
- java.lang.Object
-
- org.apache.directory.api.ldap.model.message.AbstractMessage
-
- org.apache.directory.api.ldap.model.message.AbstractRequest
-
- org.apache.directory.api.ldap.model.message.AbstractExtendedRequest
-
- All Implemented Interfaces:
ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
- Direct Known Subclasses:
OpaqueExtendedRequest
public abstract class AbstractExtendedRequest extends AbstractRequest implements ExtendedRequest
ExtendedRequest implementation.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description AbstractExtendedRequest()
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.AbstractExtendedRequest(int id)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ExtendedRequest
addAllControls(Control[] controls)
Adds an array of controls to this Message.ExtendedRequest
addControl(Control control)
Adds a control to this Message.boolean
equals(Object obj)
Checks to see if an object equals this ExtendedRequest.String
getRequestName()
Gets the Object Identifier corresponding to the extended request type.ExtendedResponse
getResponse()
MessageTypeEnum
getResponseType()
Gets the protocol response message type for this request which produces at least one response.abstract ExtendedResponse
getResultResponse()
The result containing response for this request.int
hashCode()
ExtendedRequest
removeControl(Control control)
Deletes a control removing it from this Message.ExtendedRequest
setMessageId(int messageId)
Sets the Message ID for this requestExtendedRequest
setRequestName(String newOid)
Sets the Object Identifier corresponding to the extended request type.void
setResponse(ExtendedResponse response)
String
toString()
Get a String representation of an Extended Request-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest
hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
-
-
-
Constructor Detail
-
AbstractExtendedRequest
public AbstractExtendedRequest()
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.
-
AbstractExtendedRequest
public AbstractExtendedRequest(int id)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.- Parameters:
id
- the sequential message identifier
-
-
Method Detail
-
getRequestName
public String getRequestName()
Gets the Object Identifier corresponding to the extended request type. This is the requestName portion of the ext. req. PDU.- Specified by:
getRequestName
in interfaceExtendedRequest
- Returns:
- the dotted-decimal representation as a String of the OID
-
setRequestName
public ExtendedRequest setRequestName(String newOid)
Sets the Object Identifier corresponding to the extended request type.- Specified by:
setRequestName
in interfaceExtendedRequest
- Parameters:
newOid
- the dotted-decimal representation as a String of the OID- Returns:
- The ExtendedRequest instance
-
setMessageId
public ExtendedRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageId
in interfaceExtendedRequest
- Specified by:
setMessageId
in interfaceMessage
- Overrides:
setMessageId
in classAbstractMessage
- Parameters:
messageId
- The message Id- Returns:
- A Message reference
-
addControl
public ExtendedRequest addControl(Control control)
Adds a control to this Message.- Specified by:
addControl
in interfaceExtendedRequest
- Specified by:
addControl
in interfaceMessage
- Overrides:
addControl
in classAbstractMessage
- Parameters:
control
- the control to add.- Returns:
- A Message reference
-
addAllControls
public ExtendedRequest addAllControls(Control[] controls)
Adds an array of controls to this Message.- Specified by:
addAllControls
in interfaceExtendedRequest
- Specified by:
addAllControls
in interfaceMessage
- Overrides:
addAllControls
in classAbstractMessage
- Parameters:
controls
- the controls to add.- Returns:
- A Message reference
-
removeControl
public ExtendedRequest removeControl(Control control)
Deletes a control removing it from this Message.- Specified by:
removeControl
in interfaceExtendedRequest
- Specified by:
removeControl
in interfaceMessage
- Overrides:
removeControl
in classAbstractMessage
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
getResponseType
public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.- Specified by:
getResponseType
in interfaceSingleReplyRequest
- Returns:
- the message type of the response.
-
getResultResponse
public abstract ExtendedResponse getResultResponse()
The result containing response for this request.- Specified by:
getResultResponse
in interfaceResultResponseRequest
- Returns:
- the result containing response for this request
-
getResponse
public ExtendedResponse getResponse()
- Returns:
- the response
-
setResponse
public void setResponse(ExtendedResponse response)
- Parameters:
response
- the response to set
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractRequest
- Returns:
- the instance's hash code
- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
Checks to see if an object equals this ExtendedRequest.- Overrides:
equals
in classAbstractRequest
- Parameters:
obj
- the object to be checked for equality- Returns:
- true if the obj equals this ExtendedRequest, false otherwise
-
-