@NotExtensible @ThreadSafety(level=COMPLETELY_THREADSAFE) public interface LDAPConnectionInfo
Modifier and Type | Method and Description |
---|---|
int |
getActiveOperationCount()
Retrieves the number of outstanding operations on this LDAP connection
(i.e., the number of operations currently in progress).
|
java.lang.String |
getConnectedAddress()
Retrieves the address of the directory server to which this connection is
currently established.
|
java.net.InetAddress |
getConnectedInetAddress()
Retrieves an
InetAddress object that represents the address of the
server to which this connection is currently established. |
java.lang.String |
getConnectedIPAddress()
Retrieves the string representation of the IP address to which this
connection is currently established.
|
int |
getConnectedPort()
Retrieves the port of the directory server to which this connection is
currently established.
|
long |
getConnectionID()
Retrieves a value that uniquely identifies this connection within the JVM
Each
LDAPConnection object will be assigned a different connection
ID, and that connection ID will not change over the life of the object,
even if the connection is closed and re-established (whether re-established
to the same server or a different server). |
java.lang.String |
getConnectionName()
Retrieves the user-friendly name that has been assigned to this connection.
|
java.lang.String |
getConnectionPoolName()
Retrieves the user-friendly name that has been assigned to the connection
pool with which this connection is associated.
|
LDAPConnectionStatistics |
getConnectionStatistics()
Retrieves the connection statistics for this LDAP connection.
|
java.lang.StackTraceElement[] |
getConnectStackTrace()
Retrieves a stack trace of the thread that last attempted to establish this
connection.
|
long |
getConnectTime()
Retrieves the time that this connection was established in the number of
milliseconds since January 1, 1970 UTC (the same format used by
System.currentTimeMillis . |
java.lang.Throwable |
getDisconnectCause()
Retrieves the disconnect cause for this connection, which is an exception
or error that triggered the connection termination, if available.
|
java.lang.String |
getDisconnectMessage()
Retrieves the disconnect message for this connection, which may provide
additional information about the reason for the disconnect, if available.
|
DisconnectType |
getDisconnectType()
Retrieves the disconnect type for this connection, if available.
|
java.lang.String |
getHostPort()
Retrieves a string representation of the host and port for the server to
to which the last connection attempt was made.
|
BindRequest |
getLastBindRequest()
Retrieves the last successful bind request processed on this connection.
|
long |
getLastCommunicationTime()
Retrieves the time that this connection was last used to send or receive an
LDAP message.
|
javax.net.SocketFactory |
getLastUsedSocketFactory()
Retrieves the socket factory that was used when creating the socket for the
last connection attempt (whether successful or unsuccessful) for this LDAP
connection.
|
javax.net.SocketFactory |
getSocketFactory()
Retrieves the socket factory to use to create the socket for subsequent
connection attempts.
|
javax.net.ssl.SSLSession |
getSSLSession()
Retrieves the
SSLSession currently being used to secure
communication on this connection. |
ExtendedRequest |
getStartTLSRequest()
Retrieves the StartTLS request used to secure this connection.
|
boolean |
isConnected()
Indicates whether this connection is currently established.
|
boolean |
synchronousMode()
Indicates whether this connection is operating in synchronous mode.
|
java.lang.String |
toString()
Retrieves a string representation of this LDAP connection.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP connection to the provided
buffer.
|
boolean isConnected()
true
if this connection is currently established, or
false
if it is not.@Nullable javax.net.SocketFactory getLastUsedSocketFactory()
null
if no attempt has yet been made to establish this connection.@NotNull javax.net.SocketFactory getSocketFactory()
@Nullable javax.net.ssl.SSLSession getSSLSession()
SSLSession
currently being used to secure
communication on this connection. This may be available for connections
that were secured at the time they were created (via an
SSLSocketFactory
), or for connections secured after their creation
(via the StartTLS extended operation). This will not be available for
unencrypted connections, or connections secured in other ways (e.g., via
SASL QoP).SSLSession
currently being used to secure
communication on this connection, or null
if no
SSLSession
is available.long getConnectionID()
LDAPConnection
object will be assigned a different connection
ID, and that connection ID will not change over the life of the object,
even if the connection is closed and re-established (whether re-established
to the same server or a different server).@Nullable java.lang.String getConnectionName()
null
if none has been assigned.@Nullable java.lang.String getConnectionPoolName()
null
if
none has been assigned or this connection is not associated with a
connection pool.@NotNull java.lang.String getHostPort()
@Nullable java.lang.String getConnectedAddress()
null
if the connection is not
established.@Nullable java.lang.String getConnectedIPAddress()
null
if the
connection is not established.@Nullable java.net.InetAddress getConnectedInetAddress()
InetAddress
object that represents the address of the
server to which this connection is currently established.InetAddress
that represents the address of the server
to which this connection is currently established, or null
if the connection is not established.int getConnectedPort()
@Nullable java.lang.StackTraceElement[] getConnectStackTrace()
LDAPConnectionOptions.captureConnectStackTrace()
method for the
associated connection options returns true
.null
connect stack traces are not enabled,
or if no attempt has been made to establish this connection.@Nullable DisconnectType getDisconnectType()
null
if no
disconnect type has been set.@Nullable java.lang.String getDisconnectMessage()
null
if
no disconnect message has been set.@Nullable java.lang.Throwable getDisconnectCause()
null
if no
disconnect cause has been set.@Nullable BindRequest getLastBindRequest()
null
if no bind has been performed, or if the last
bind attempt was not successful.@Nullable ExtendedRequest getStartTLSRequest()
null
if StartTLS has not been used to secure this
connection.boolean synchronousMode()
true
if this connection is operating in synchronous mode,
or false
if not.long getConnectTime()
System.currentTimeMillis
.long getLastCommunicationTime()
System.currentTimeMillis
.getConnectTime()
will be
returned.@NotNull LDAPConnectionStatistics getConnectionStatistics()
int getActiveOperationCount()
@NotNull java.lang.String toString()
toString
in class java.lang.Object