Package org.ldaptive.extended
Class ExtendedRequest
- java.lang.Object
-
- org.ldaptive.AbstractRequestMessage
-
- org.ldaptive.extended.ExtendedRequest
-
- All Implemented Interfaces:
Request
- Direct Known Subclasses:
CancelRequest
,FastBindRequest
,PasswordModifyRequest
,StartTLSRequest
,WhoAmIRequest
public class ExtendedRequest extends AbstractRequestMessage
LDAP extended request defined as:ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtendedRequest.Builder
Extended request builder.-
Nested classes/interfaces inherited from class org.ldaptive.AbstractRequestMessage
AbstractRequestMessage.AbstractBuilder<B,T extends AbstractRequestMessage>
-
-
Field Summary
Fields Modifier and Type Field Description static int
PROTOCOL_OP
BER protocol number.private String
requestName
Extended request name.private byte[]
requestValue
Extended request value.-
Fields inherited from class org.ldaptive.AbstractRequestMessage
logger
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ExtendedRequest()
Default constructor.ExtendedRequest(String name)
Creates a new extended request.ExtendedRequest(String name, byte[] value)
Creates a new extended request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExtendedRequest.Builder
builder()
Creates a builder for this class.protected DEREncoder[]
getRequestEncoders(int id)
Returns the request encoders for this message.protected void
setRequestValue(byte[] value)
Sets the request value.String
toString()
-
Methods inherited from class org.ldaptive.AbstractRequestMessage
encode, getControls, getResponseTimeout, setControls, setResponseTimeout
-
-
-
-
Field Detail
-
PROTOCOL_OP
public static final int PROTOCOL_OP
BER protocol number.- See Also:
- Constant Field Values
-
requestName
private String requestName
Extended request name.
-
requestValue
private byte[] requestValue
Extended request value.
-
-
Constructor Detail
-
ExtendedRequest
private ExtendedRequest()
Default constructor.
-
ExtendedRequest
public ExtendedRequest(String name)
Creates a new extended request.- Parameters:
name
- of this request
-
ExtendedRequest
public ExtendedRequest(String name, byte[] value)
Creates a new extended request.- Parameters:
name
- of this requestvalue
- of this request
-
-
Method Detail
-
setRequestValue
protected void setRequestValue(byte[] value)
Sets the request value. Protected method available for extension.- Parameters:
value
- request value
-
getRequestEncoders
protected DEREncoder[] getRequestEncoders(int id)
Description copied from class:AbstractRequestMessage
Returns the request encoders for this message.- Specified by:
getRequestEncoders
in classAbstractRequestMessage
- Parameters:
id
- message ID- Returns:
- request encoders
-
toString
public String toString()
- Overrides:
toString
in classAbstractRequestMessage
-
builder
public static ExtendedRequest.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-