Package org.ldaptive
Class SimpleBindRequest
- java.lang.Object
-
- org.ldaptive.AbstractRequestMessage
-
- org.ldaptive.SimpleBindRequest
-
- All Implemented Interfaces:
BindRequest
,Request
public class SimpleBindRequest extends AbstractRequestMessage implements BindRequest
LDAP simple bind request.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleBindRequest.Builder
Simple bind 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 private String
ldapDN
LDAP DN to bind as.private String
password
Password for the LDAP DN.-
Fields inherited from class org.ldaptive.AbstractRequestMessage
logger
-
Fields inherited from interface org.ldaptive.BindRequest
PROTOCOL_OP, VERSION
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SimpleBindRequest()
Default constructor.SimpleBindRequest(String name, String pass)
Creates a new simple bind request.SimpleBindRequest(String name, Credential cred)
Creates a new simple bind request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleBindRequest.Builder
builder()
Creates a builder for this class.protected DEREncoder[]
getRequestEncoders(int id)
Returns the request encoders for this message.protected void
setLdapDN(String name)
Sets the LDAP DN.protected void
setPassword(String pass)
Sets the password.String
toString()
-
Methods inherited from class org.ldaptive.AbstractRequestMessage
encode, getControls, getResponseTimeout, setControls, setResponseTimeout
-
-
-
-
Constructor Detail
-
SimpleBindRequest
private SimpleBindRequest()
Default constructor.
-
SimpleBindRequest
public SimpleBindRequest(String name, String pass)
Creates a new simple bind request.- Parameters:
name
- to bind aspass
- to bind with
-
SimpleBindRequest
public SimpleBindRequest(String name, Credential cred)
Creates a new simple bind request.- Parameters:
name
- to bind ascred
- to bind with
-
-
Method Detail
-
setLdapDN
protected void setLdapDN(String name)
Sets the LDAP DN.- Parameters:
name
- LDAP DN to set- Throws:
IllegalArgumentException
- if name is null or empty
-
setPassword
protected void setPassword(String pass)
Sets the password.- Parameters:
pass
- password to set- Throws:
IllegalArgumentException
- if pass is null or empty
-
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 SimpleBindRequest.Builder builder()
Creates a builder for this class.- Returns:
- new builder
-
-