@Extensible @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class ServerSet extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
ServerSet()
Creates a new instance of this server set.
|
Modifier and Type | Method and Description |
---|---|
abstract LDAPConnection |
getConnection()
Attempts to establish a connection to one of the directory servers in this
server set.
|
LDAPConnection |
getConnection(LDAPConnectionPoolHealthCheck healthCheck)
Attempts to establish a connection to one of the directory servers in this
server set, using the provided health check to further validate the
connection.
|
java.lang.String |
toString()
Retrieves a string representation of this server set.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this server set to the provided buffer.
|
protected ServerSet()
public abstract LDAPConnection getConnection() throws LDAPException
LDAPConnection.getConnectedAddress()
and
LDAPConnection.getConnectedPort()
methods.LDAPConnection
object that is established to one of the
servers in this server set.LDAPException
- If it is not possible to establish a connection to
any of the servers in this server set.public LDAPConnection getConnection(LDAPConnectionPoolHealthCheck healthCheck) throws LDAPException
LDAPConnection.getConnectedAddress()
and
LDAPConnection.getConnectedPort()
methods.healthCheck
- The health check to use to make the determination, or
null
if no additional health check should be
performed.LDAPConnection
object that is established to one of the
servers in this server set.LDAPException
- If it is not possible to establish a connection to
any of the servers in this server set.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the string representation should be
appended.