|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.ServerSet
public abstract class ServerSet
This class defines an API that can be used to select between multiple
directory servers when establishing a connection. Implementations are free
to use any kind of logic that they desire when selecting the server to which
the connection is to be established. They may also support the use of
health checks to determine whether the created connections are suitable for
use.
Implementations MUST be threadsafe to allow for multiple concurrent attempts
to establish new connections.
Constructor Summary | |
---|---|
protected |
ServerSet()
Creates a new instance of this server set. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ServerSet()
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |