@ThreadSafety(level=COMPLETELY_THREADSAFE) public enum DisconnectType extends java.lang.Enum<DisconnectType>
LDAPConnection
was
disconnected. Note that additional disconnect types may be added in the
future, so any decision made based on a disconnect type should account for
the possibility of previously-undefined disconnect types.Enum Constant and Description |
---|
BIND_FAILED
The connection was closed because a bind performed as part of the
creation did not complete successfully.
|
CLOSED_BY_FINALIZER
The connection was closed by a finalizer in the LDAP SDK, which indicates
that it was not properly closed by the application that had been using
it.
|
CLOSED_WITHOUT_UNBIND
The connection was closed at the request of the client, but without first
sending an unbind request.
|
DECODE_ERROR
The connection was closed because an error occurred while trying to decode
data from the server.
|
IO_ERROR
The connection was closed because an I/O problem was encountered while
trying to communicate with the server.
|
LOCAL_ERROR
The connection was closed because an unexpected error occurred within the
LDAP SDK.
|
OTHER
The connection was closed for a reason that does not fit any other
defined disconnect type.
|
POOL_CLOSED
The connection was closed because it was part of a connection pool that
was closed.
|
POOL_CREATION_FAILURE
The connection was closed because it was part of a connection pool that
was being initialized and a failure occurred while attempting to create
another connection as part of the pool.
|
POOLED_CONNECTION_DEFUNCT
The connection was closed because it was part of a connection pool and had
been classified as defunct.
|
POOLED_CONNECTION_EXPIRED
The connection was closed because it was part of a connection pool and the
connection had been established for longer than the maximum connection
age for the pool.
|
POOLED_CONNECTION_UNNEEDED
The connection was closed because it was part of a connection pool and was
no longer needed.
|
RECONNECT
The connection was closed because it is going to be re-established.
|
REFERRAL
The connection was closed because it had been a temporary connection
created for following a referral and was no longer needed.
|
SECURITY_PROBLEM
The connection was closed because a problem was encountered while
negotiating a security layer with the server.
|
SERVER_CLOSED_WITH_NOTICE
The connection was closed by the server, and a notice of disconnection
unsolicited notification was provided.
|
SERVER_CLOSED_WITHOUT_NOTICE
The connection was closed by the server without a notice of disconnection.
|
UNBIND
The connection was closed as a result of an unbind request sent by the
client.
|
UNKNOWN
The reason for the disconnect is not known.
|
Modifier and Type | Method and Description |
---|---|
static DisconnectType |
forName(java.lang.String name)
Retrieves the disconnect type with the specified name.
|
java.lang.String |
getDescription()
Retrieves the description for this disconnect type.
|
ResultCode |
getResultCode()
Retrieves the result code most closely associated with this disconnect
type.
|
static boolean |
isExpected(DisconnectType disconnectType)
Indicates whether the provided disconnect type is likely one that is
expected in some way.
|
java.lang.String |
toString()
Retrieves a string representation for this disconnect type.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this disconnect type to the provided
buffer.
|
static DisconnectType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DisconnectType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DisconnectType UNBIND
public static final DisconnectType CLOSED_WITHOUT_UNBIND
public static final DisconnectType BIND_FAILED
public static final DisconnectType RECONNECT
public static final DisconnectType REFERRAL
public static final DisconnectType SERVER_CLOSED_WITH_NOTICE
public static final DisconnectType SERVER_CLOSED_WITHOUT_NOTICE
public static final DisconnectType IO_ERROR
public static final DisconnectType DECODE_ERROR
public static final DisconnectType LOCAL_ERROR
public static final DisconnectType SECURITY_PROBLEM
public static final DisconnectType POOL_CLOSED
public static final DisconnectType POOL_CREATION_FAILURE
public static final DisconnectType POOLED_CONNECTION_DEFUNCT
public static final DisconnectType POOLED_CONNECTION_EXPIRED
public static final DisconnectType POOLED_CONNECTION_UNNEEDED
public static final DisconnectType UNKNOWN
public static final DisconnectType CLOSED_BY_FINALIZER
public static final DisconnectType OTHER
public static DisconnectType[] values()
for (DisconnectType c : DisconnectType.values()) System.out.println(c);
public static DisconnectType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@NotNull public java.lang.String getDescription()
@NotNull public ResultCode getResultCode()
@Nullable public static DisconnectType forName(@NotNull java.lang.String name)
name
- The name of the disconnect type to retrieve.null
if no such
disconnect type is defined.public static boolean isExpected(@NotNull DisconnectType disconnectType)
disconnectType
- The disconnect type for which to make the
determination.true
if the connection is one that can be classified as
expected and there is likely nothing that a disconnect handler
needs to do to handle it, or false
if not.@NotNull public java.lang.String toString()
toString
in class java.lang.Enum<DisconnectType>