|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.DefaultConnectionFactory.DefaultConnection
protected static class DefaultConnectionFactory.DefaultConnection
Default implementation for managing a connection to an LDAP.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
DefaultConnectionFactory.DefaultConnection(ConnectionConfig cc,
ProviderConnectionFactory<?> cf)
Creates a new default connection. |
|
| Method Summary | |
|---|---|
void |
close()
This will close the connection to the LDAP. |
void |
close(RequestControl[] controls)
This will close the connection to the LDAP using the supplied controls. |
protected void |
finalize()
|
ConnectionConfig |
getConnectionConfig()
Returns the connection config for this connection. |
ProviderConnection |
getProviderConnection()
Returns the provider specific connection. |
boolean |
isOpen()
Returns whether the underlying provider connection is not null. |
Response<Void> |
open()
This will establish a connection if one does not already exist. |
Response<Void> |
open(BindRequest request)
This will establish a connection if one does not already exist and bind to the LDAP using the supplied bind request. |
Response<Void> |
reopen()
This will close an existing connection to the LDAP and establish a new connection to the LDAP. |
Response<Void> |
reopen(BindRequest request)
This will close an existing connection to the LDAP and establish a new connection to the LDAP using the supplied bind request. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public DefaultConnectionFactory.DefaultConnection(ConnectionConfig cc,
ProviderConnectionFactory<?> cf)
cc - connection configurationcf - provider connection factory| Method Detail |
|---|
public ConnectionConfig getConnectionConfig()
getConnectionConfig in interface Connectionpublic ProviderConnection getProviderConnection()
open().
getProviderConnection in interface ConnectionIllegalStateException - if the connection is not open
public Response<Void> open()
throws LdapException
close().
open in interface ConnectionConnectionInitializer or an
empty response if no connection initializer was configured
IllegalStateException - if the connection is already open
LdapException - if the LDAP cannot be reached
public Response<Void> open(BindRequest request)
throws LdapException
close().
open in interface Connectionrequest - bind request
IllegalStateException - if the connection is already open
LdapException - if the LDAP cannot be reachedpublic boolean isOpen()
isOpen in interface Connectionpublic void close()
close in interface Connectionpublic void close(RequestControl[] controls)
close in interface Connectioncontrols - request controls
public Response<Void> reopen()
throws LdapException
reopen in interface ConnectionConnectionInitializer or an
empty response if no connection initializer was configured
LdapException - if the LDAP cannot be reached
public Response<Void> reopen(BindRequest request)
throws LdapException
reopen in interface Connectionrequest - containing bind information
LdapException - if the LDAP cannot be reachedpublic String toString()
toString in class Object
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||