|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.LDAPRequest
com.unboundid.ldap.sdk.BindRequest
com.unboundid.ldap.sdk.SASLBindRequest
com.unboundid.ldap.sdk.ANONYMOUSBindRequest
@NotMutable @ThreadSafety(level=NOT_THREADSAFE) public final class ANONYMOUSBindRequest
This class provides a SASL ANONYMOUS bind request implementation as described
in RFC 4505. Binding with
The ANONYMOUS SASL mechanism is essentially equivalent to using an anonymous
simple bind (i.e., a simple bind with an empty password), although the SASL
ANONYMOUS mechanism does provide the ability to include additional trace
information with the request that may be logged or otherwise handled by
the server.
ANONYMOUSBindRequest bindRequest = new ANONYMOUSBindRequest("Demo Application"); BindResult bindResult; try { bindResult = connection.bind(bindRequest); // If we get here, then the bind was successful. } catch (LDAPException le) { // The bind failed for some reason. bindResult = new BindResult(le.toLDAPResult()); ResultCode resultCode = le.getResultCode(); String errorMessageFromServer = le.getDiagnosticMessage(); }
Field Summary | |
---|---|
static java.lang.String |
ANONYMOUS_MECHANISM_NAME
The name for the ANONYMOUS SASL mechanism. |
Fields inherited from class com.unboundid.ldap.sdk.SASLBindRequest |
---|
CRED_TYPE_SASL |
Fields inherited from class com.unboundid.ldap.sdk.BindRequest |
---|
VERSION_ELEMENT |
Constructor Summary | |
---|---|
ANONYMOUSBindRequest()
Creates a new SASL ANONYMOUS bind request with no trace string and no controls. |
|
ANONYMOUSBindRequest(Control... controls)
Creates a new SASL ANONYMOUS bind request with the provided set of controls and no trace string. |
|
ANONYMOUSBindRequest(java.lang.String traceString)
Creates a new SASL ANONYMOUS bind request with the provided trace string and no controls. |
|
ANONYMOUSBindRequest(java.lang.String traceString,
Control... controls)
Creates a new SASL ANONYMOUS bind request with the provided trace string and controls. |
Method Summary | |
---|---|
ANONYMOUSBindRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request. |
ANONYMOUSBindRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request. |
ANONYMOUSBindRequest |
getRebindRequest(java.lang.String host,
int port)
Retrieves a bind request that may be used to re-bind using the same credentials authentication type and credentials as previously used to perform the initial bind. |
java.lang.String |
getSASLMechanismName()
Retrieves the name of the SASL mechanism used in this SASL bind request. |
java.lang.String |
getTraceString()
Retrieves the trace string that will be included with the bind request. |
protected BindResult |
process(LDAPConnection connection,
int depth)
Sends this bind request to the target server over the provided connection and returns the corresponding response. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer. |
Methods inherited from class com.unboundid.ldap.sdk.SASLBindRequest |
---|
getBindType, getLastMessageID, responseReceived, sendBindRequest, sendMessage |
Methods inherited from class com.unboundid.ldap.sdk.BindRequest |
---|
getOperationType |
Methods inherited from class com.unboundid.ldap.sdk.LDAPRequest |
---|
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setResponseTimeoutMillis, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ANONYMOUS_MECHANISM_NAME
Constructor Detail |
---|
public ANONYMOUSBindRequest()
public ANONYMOUSBindRequest(java.lang.String traceString)
traceString
- The trace string to include in the bind request, or
null
if no trace string is to be provided.public ANONYMOUSBindRequest(Control... controls)
controls
- The set of controls to include in the request.public ANONYMOUSBindRequest(java.lang.String traceString, Control... controls)
traceString
- The trace string to include in the bind request, or
null
if no trace string is to be provided.controls
- The set of controls to include in the request.Method Detail |
---|
public java.lang.String getSASLMechanismName()
getSASLMechanismName
in class SASLBindRequest
public java.lang.String getTraceString()
null
if there is to be no trace string.protected BindResult process(LDAPConnection connection, int depth) throws LDAPException
process
in class BindRequest
connection
- The connection to use to send this bind request to the
server and read the associated response.depth
- The current referral depth for this request. It should
always be one for the initial request, and should only
be incremented when following referrals.
LDAPException
- If a problem occurs while sending the request or
reading the response.public ANONYMOUSBindRequest getRebindRequest(java.lang.String host, int port)
getRebindRequest
in class BindRequest
host
- The address of the directory server to which the connection
is established.port
- The port of the directory server to which the connection is
established.
null
to indicate that automatic
re-binding is not supported for this type of bind request.public ANONYMOUSBindRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
public ANONYMOUSBindRequest duplicate(Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
controls
- The set of controls to include in the duplicate request.
public void toString(java.lang.StringBuilder buffer)
toString
in interface ReadOnlyLDAPRequest
toString
in class LDAPRequest
buffer
- The buffer to which to append a string representation of
this request.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |