Package org.opends.server.protocols.jmx
Class JmxClientConnection
java.lang.Object
org.opends.server.api.ClientConnection
org.opends.server.protocols.jmx.JmxClientConnection
- All Implemented Interfaces:
EventListener,NotificationListener
This class defines the set of methods and structures that must be implemented by a Directory Server client
connection.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddisconnect(DisconnectReason disconnectReason, boolean sendNotification, LocalizableMessage message) Asynchronously closes the connection to the client, optionally sending it a message indicating the reason for the closure.protected voidfinalize()Called by the Gc when the object is garbage collected Release the cursor in case the iterator was badly used and releaseCursor was never called.Retrieves a string representation of the address of the client.intRetrieves the port number for this connection on the client system if available.Retrieves the connection handler that accepted this client connection.longRetrieves the unique identifier that has been assigned to this connection.Returns a summary of this client connection in JSON (format that is both human readable and machine parseable).Retrieves the protocol that the client is using to communicate with the Directory Server.Retrieves theInetAddressassociated with the remote client system.Retrieves a string representation of the address on the server to which the client connected.intRetrieves the port number for this connection on the server system if available.intgetSSF()Return the Security Strength Factor of a client connection.voidhandleNotification(Notification notif, Object handback) booleanReturns whether the Directory Server believes this connection to be valid and available for communication.booleanisSecure()Indicates whether this client connection is currently using a secure mechanism to communicate with the server.voidtoString(StringBuilder buffer) Appends a string representation of this client connection to the provided buffer.Methods inherited from class org.opends.server.api.ClientConnection
cancelAllRequestsExcept, cancelRequest, convertResult, deregisterPersistentSearch, finalizeConnectionInternal, getAuthenticationInfo, getClientCertificateChain, getClientHostPort, getConnectTimeString, getIdleTime, getPersistentSearches, getResourceLimits, getSASLAuthStateInfo, getServerContext, getServerHostPort, getThreadNameForRequest, getTlsCipher, getTlsProtocol, hasAllPrivileges, hasPrivilege, hasPrivilege, isStartTlsSupported, mustChangePassword, mustLogTlsHandshake, registerPersistentSearch, setAuthenticationInfo, setAuthenticationInfoNoTrackingOfAuthenticatedUsers, setMustChangePassword, setResourceLimits, setSASLAuthStateInfo, setUnauthenticated, toString, updateAuthenticationInfo, writeTimeLimitExceeded
-
Method Details
-
handleNotification
- Specified by:
handleNotificationin interfaceNotificationListener
-
getConnectionID
public long getConnectionID()Description copied from class:ClientConnectionRetrieves the unique identifier that has been assigned to this connection.- Specified by:
getConnectionIDin classClientConnection- Returns:
- The unique identifier that has been assigned to this connection.
-
getConnectionHandler
Description copied from class:ClientConnectionRetrieves the connection handler that accepted this client connection.- Specified by:
getConnectionHandlerin classClientConnection- Returns:
- The connection handler that accepted this client connection.
-
getProtocol
Description copied from class:ClientConnectionRetrieves the protocol that the client is using to communicate with the Directory Server.- Specified by:
getProtocolin classClientConnection- Returns:
- The protocol that the client is using to communicate with the Directory Server.
-
getClientAddress
Description copied from class:ClientConnectionRetrieves a string representation of the address of the client.- Specified by:
getClientAddressin classClientConnection- Returns:
- A string representation of the address of the client.
-
getClientPort
public int getClientPort()Description copied from class:ClientConnectionRetrieves the port number for this connection on the client system if available.- Specified by:
getClientPortin classClientConnection- Returns:
- The port number for this connection on the client system or -1 if there is no client port associated with this connection (e.g. internal client).
-
getServerAddress
Description copied from class:ClientConnectionRetrieves a string representation of the address on the server to which the client connected.- Specified by:
getServerAddressin classClientConnection- Returns:
- A string representation of the address on the server to which the client connected.
-
getServerPort
public int getServerPort()Description copied from class:ClientConnectionRetrieves the port number for this connection on the server system if available.- Specified by:
getServerPortin classClientConnection- Returns:
- The port number for this connection on the server system or -1 if there is no server port associated with this connection (e.g. internal client).
-
getRemoteAddress
Description copied from class:ClientConnectionRetrieves theInetAddressassociated with the remote client system.- Specified by:
getRemoteAddressin classClientConnection- Returns:
- The
InetAddressassociated with the remote client system. It may benullif the client is not connected over an IP-based connection.
-
isConnectionValid
public boolean isConnectionValid()Description copied from class:ClientConnectionReturns whether the Directory Server believes this connection to be valid and available for communication.- Specified by:
isConnectionValidin classClientConnection- Returns:
- true if the connection is valid, false otherwise
-
isSecure
public boolean isSecure()Description copied from class:ClientConnectionIndicates whether this client connection is currently using a secure mechanism to communicate with the server. Note that this may change over time based on operations performed by the client or server (e.g., it may go fromfalsetotrueif the client uses the StartTLS extended operation).- Specified by:
isSecurein classClientConnection- Returns:
trueif the client connection is currently using a secure mechanism to communicate with the server, orfalseif not.
-
disconnect
public void disconnect(DisconnectReason disconnectReason, boolean sendNotification, LocalizableMessage message) Description copied from class:ClientConnectionAsynchronously closes the connection to the client, optionally sending it a message indicating the reason for the closure. Note that the ability to send a notice of disconnection may not be available for all protocols or under all circumstances.All subclasses must invoke the
finalizeConnectionInternalmethod during the course of processing this method. In addition, implementations should not block until active requests are cancelled due to the risk of deadlocks in cases where a request attempts to disconnect its own connection (e.g. when deleting the authenticated user).- Specified by:
disconnectin classClientConnection- Parameters:
disconnectReason- The disconnect reason that provides the generic cause for the disconnect.sendNotification- Indicates whether to try to provide notification to the client that the connection will be closed.message- The message to send to the client. It may benullif no notification is to be sent.
-
getMonitorSummary
Description copied from class:ClientConnectionReturns a summary of this client connection in JSON (format that is both human readable and machine parseable).- Specified by:
getMonitorSummaryin classClientConnection- Returns:
- A summary of this client connection in JSON.
-
toString
Description copied from class:ClientConnectionAppends a string representation of this client connection to the provided buffer.- Specified by:
toStringin classClientConnection- Parameters:
buffer- The buffer to which the information should be appended.
-
finalize
protected void finalize()Called by the Gc when the object is garbage collected Release the cursor in case the iterator was badly used and releaseCursor was never called. -
getSSF
public int getSSF()Description copied from class:ClientConnectionReturn the Security Strength Factor of a client connection.- Specified by:
getSSFin classClientConnection- Returns:
- An integer representing the SSF value of a connection.
-