Interface Request
- All Known Subinterfaces:
AbandonRequest,AddRequest,AnonymousSASLBindRequest,BindRequest,CancelExtendedRequest,ChangeRecord,CompareRequest,CRAMMD5SASLBindRequest,DeleteRequest,DigestMD5SASLBindRequest,ExtendedRequest<S>,ExternalSASLBindRequest,GenericBindRequest,GenericExtendedRequest,GSSAPISASLBindRequest,ModifyDNRequest,ModifyRequest,PasswordModifyExtendedRequest,PlainSASLBindRequest,SASLBindRequest,SearchRequest,SimpleBindRequest,StartTLSExtendedRequest,UnbindRequest,WhoAmIExtendedRequest
- All Known Implementing Classes:
AbstractExtendedRequest
public interface Request
The base class of all Requests provides methods for querying and manipulating
the set of Controls included with a Request.
-
Method Summary
Modifier and TypeMethodDescriptionaddControl(Control control) Adds the provided control to this request.booleancontainsControl(String oid) Returnstrueif this request contains the specified request control.<C extends Control>
CgetControl(ControlDecoder<C> decoder, DecodeOptions options) Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.Returns aListcontaining the controls included with this request.
-
Method Details
-
addControl
Adds the provided control to this request.- Parameters:
control- The control to be added to this request.- Returns:
- This request.
- Throws:
UnsupportedOperationException- If this request does not permit controls to be added.NullPointerException- Ifcontrolwasnull.
-
containsControl
Returnstrueif this request contains the specified request control.- Parameters:
oid- The numeric OID of the request control.- Returns:
trueif this request contains the specified request control.
-
getControl
<C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.- Type Parameters:
C- The type of control to be decoded and returned.- Parameters:
decoder- The control decoder.options- The set of decode options which should be used when decoding the control.- Returns:
- The decoded control, or
nullif the control is not included with this request. - Throws:
DecodeException- If the control could not be decoded because it was malformed in some way (e.g. the control value was missing, or its content could not be decoded).NullPointerException- Ifdecoderoroptionswasnull.
-
getControls
Returns aListcontaining the controls included with this request. The returnedListmay be modified if permitted by this request.- Returns:
- A
Listcontaining the controls.
-