Class OpaqueExtendedRequest
- 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.OpaqueExtendedRequest
-
- All Implemented Interfaces:
ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class OpaqueExtendedRequest extends AbstractRequest implements ExtendedRequest
ExtendedRequest basic implementation.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description OpaqueExtendedRequest()
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.OpaqueExtendedRequest(byte[] requestValue)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.OpaqueExtendedRequest(String requestName)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.OpaqueExtendedRequest(String requestName, byte[] requestValue)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.
-
Method Summary
All Methods Instance 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.ExtendedResponse
getExtendedResponse()
The result containing response for this request.String
getRequestName()
Gets the Object Identifier corresponding to the extended request type.byte[]
getRequestValue()
MessageTypeEnum
getResponseType()
Gets the protocol response message type for this request which produces at least one response.ExtendedResponse
getResultResponse()
If called for the first time, this method creates a result containing response object 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
setRequestValue(byte[] requestValue)
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
-
OpaqueExtendedRequest
public OpaqueExtendedRequest()
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.
-
OpaqueExtendedRequest
public OpaqueExtendedRequest(String requestName)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.- Parameters:
requestName
- the extended request name
-
OpaqueExtendedRequest
public OpaqueExtendedRequest(byte[] requestValue)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.- Parameters:
requestValue
- the embedded value
-
OpaqueExtendedRequest
public OpaqueExtendedRequest(String requestName, byte[] requestValue)
Creates an ExtendedRequest implementing object used to perform extended protocol operation on the server.- Parameters:
requestValue
- the embedded value
-
-
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.
-
getExtendedResponse
public ExtendedResponse getExtendedResponse()
The result containing response for this request.- Returns:
- the result containing response for this request
-
getResultResponse
public ExtendedResponse getResultResponse()
If called for the first time, this method creates a result containing response object for this request.- Specified by:
getResultResponse
in interfaceResultResponseRequest
- Returns:
- a result containing response with defaults and the messageId set in response to this specific request
-
getRequestValue
public byte[] getRequestValue()
- Returns:
- the request value
-
setRequestValue
public void setRequestValue(byte[] requestValue)
- Parameters:
requestValue
- the requestValue 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
-
-