Interface Request
- All Superinterfaces:
ProtocolOp
- All Known Subinterfaces:
ChangeRecord
,ExtendedRequest<S>
- All Known Implementing Classes:
AbandonRequest
,AbstractExtendedRequest
,AddRequest
,BindRequest
,CancelExtendedRequest
,CompareRequest
,DeleteRequest
,GenericExtendedRequest
,InvalidRequest
,ModifyDnRequest
,ModifyRequest
,PasswordModifyExtendedRequest
,SearchRequest
,StartTlsExtendedRequest
,UnbindRequest
,UnknownRequest
,WhoAmIExtendedRequest
The base class of all Requests provides methods for querying and manipulating
the set of Controls included with a Request.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescription<R,
P, E extends Exception>
Raccept
(RequestVisitor<R, P, E> v, P p) Applies aRequestVisitor
to thisRequest
.addControl
(Control control) Adds the provided control to this protocol-op.addControls
(Iterable<? extends Control> controls) Adds the provided controls to this protocol-op.getType()
Returns the type of this request to avoid expensiveinstanceof
checks.removeControls
(String oid) Removes all the controls having the specified OID.Methods inherited from interface org.forgerock.opendj.ldap.messages.ProtocolOp
containsControl, getControl, getControl, getControls
-
Method Details
-
accept
Applies aRequestVisitor
to thisRequest
.- Type Parameters:
R
- The return type of the visitor's methods.P
- The type of the additional parameters to the visitor's methods.E
- The type of the exception thrown by the visitor method if it fails, orNeverThrowsException
if the visitor cannot fail.- Parameters:
v
- The request visitor.p
- Optional additional visitor parameter.- Returns:
- A result as specified by the visitor.
- Throws:
E
- If the visitor failed.
-
getType
Request.RequestType getType()Returns the type of this request to avoid expensiveinstanceof
checks.- Returns:
- the type of this request
-
addControl
Description copied from interface:ProtocolOp
Adds the provided control to this protocol-op.- Specified by:
addControl
in interfaceProtocolOp
- Parameters:
control
- The control to be added to this protocol-op.- Returns:
- This protocol-op.
-
addControls
Description copied from interface:ProtocolOp
Adds the provided controls to this protocol-op.- Specified by:
addControls
in interfaceProtocolOp
- Parameters:
controls
- The controls to be added to this protocol-op.- Returns:
- This protocol-op.
-
removeControls
Description copied from interface:ProtocolOp
Removes all the controls having the specified OID.- Specified by:
removeControls
in interfaceProtocolOp
- Parameters:
oid
- The numeric OID of the protocol-op control to remove.- Returns:
- This protocol-op.
-