Package com.unboundid.ldap.sdk
Class LDAPConnectionLogger
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPConnectionLogger
-
- Direct Known Subclasses:
JSONLDAPConnectionLogger
@Extensible @ThreadSafety(level=INTERFACE_THREADSAFE) public abstract class LDAPConnectionLogger extends java.lang.Object
This class defines an API that may be used to log operations processed on an LDAP connection.
-
-
Constructor Summary
Constructors Constructor Description LDAPConnectionLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
logAbandonRequest(LDAPConnectionInfo connectionInfo, int messageID, int messageIDToAbandon, java.util.List<Control> requestControls)
Performs any appropriate log processing that may be needed when an abandon request is sent over a connection.void
logAddRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyAddRequest addRequest)
Performs any appropriate log processing that may be needed when an add request is sent over a connection.void
logAddResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult addResult)
Performs any appropriate log processing that may be needed when an add response is received over a connection, or when an exception is caught while waiting for or attempting to decode an add response.void
logBindRequest(LDAPConnectionInfo connectionInfo, int messageID, SASLBindRequest bindRequest)
Performs any appropriate log processing that may be needed when a SASL bind request is sent over a connection.void
logBindRequest(LDAPConnectionInfo connectionInfo, int messageID, SimpleBindRequest bindRequest)
Performs any appropriate log processing that may be needed when a simple bind request is sent over a connection.void
logBindResult(LDAPConnectionInfo connectionInfo, int requestMessageID, BindResult bindResult)
Performs any appropriate log processing that may be needed when a bind response is received over a connection, or when an exception is caught while waiting for or attempting to decode a bind response.void
logCompareRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyCompareRequest compareRequest)
Performs any appropriate log processing that may be needed when a compare request is sent over a connection.void
logCompareResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult compareResult)
Performs any appropriate log processing that may be needed when a compare response is received over a connection, or when an exception is caught while waiting for or attempting to decode a compare response.void
logConnect(LDAPConnectionInfo connectionInfo, java.lang.String host, java.net.InetAddress inetAddress, int port)
Performs any appropriate log processing that may be needed when a connection is established.void
logConnectFailure(LDAPConnectionInfo connectionInfo, java.lang.String host, int port, LDAPException connectException)
Performs any appropriate log processing that may be needed when an attempt to establish a connection fails.void
logDeleteRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyDeleteRequest deleteRequest)
Performs any appropriate log processing that may be needed when a delete request is sent over a connection.void
logDeleteResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult deleteResult)
Performs any appropriate log processing that may be needed when a delete response is received over a connection, or when an exception is caught while waiting for or attempting to decode a delete response.void
logDisconnect(LDAPConnectionInfo connectionInfo, java.lang.String host, int port, DisconnectType disconnectType, java.lang.String disconnectMessage, java.lang.Throwable disconnectCause)
Performs any appropriate log processing that may be needed when a connection is disconnected, regardless of whether the disconnect was initiated by the client or server.void
logExtendedRequest(LDAPConnectionInfo connectionInfo, int messageID, ExtendedRequest extendedRequest)
Performs any appropriate log processing that may be needed when an extended request is sent over a connection.void
logExtendedResult(LDAPConnectionInfo connectionInfo, int requestMessageID, ExtendedResult extendedResult)
Performs any appropriate log processing that may be needed when an extended response is received over a connection, or when an exception is caught while waiting for or attempting to decode an extended response.void
logIntermediateResponse(LDAPConnectionInfo connectionInfo, int messageID, IntermediateResponse intermediateResponse)
Performs any appropriate log processing that may be needed when an intermediate response message is received over a connection.void
logModifyDNRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyModifyDNRequest modifyDNRequest)
Performs any appropriate log processing that may be needed when a modify DN request is sent over a connection.void
logModifyDNResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult modifyDNResult)
Performs any appropriate log processing that may be needed when a modify DN response is received over a connection, or when an exception is caught while waiting for or attempting to decode a modify DN response.void
logModifyRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyModifyRequest modifyRequest)
Performs any appropriate log processing that may be needed when a modify request is sent over a connection.void
logModifyResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult modifyResult)
Performs any appropriate log processing that may be needed when a modify response is received over a connection, or when an exception is caught while waiting for or attempting to decode a modify response.void
logSearchEntry(LDAPConnectionInfo connectionInfo, int requestMessageID, SearchResultEntry searchEntry)
Performs any appropriate log processing that may be needed when a search result entry response is received over a connection.void
logSearchReference(LDAPConnectionInfo connectionInfo, int requestMessageID, SearchResultReference searchReference)
Performs any appropriate log processing that may be needed when a search result reference response is received over a connection.void
logSearchRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlySearchRequest searchRequest)
Performs any appropriate log processing that may be needed when a search request is sent over a connection.void
logSearchResult(LDAPConnectionInfo connectionInfo, int requestMessageID, SearchResult searchResult)
Performs any appropriate log processing that may be needed when a search result done response is received over a connection, or when an exception is caught while waiting for or attempting to decode a search result.void
logUnbindRequest(LDAPConnectionInfo connectionInfo, int messageID, java.util.List<Control> requestControls)
Performs any appropriate log processing that may be needed when an unbind request is sent over a connection.
-
-
-
Constructor Detail
-
LDAPConnectionLogger
public LDAPConnectionLogger()
-
-
Method Detail
-
logConnect
public void logConnect(LDAPConnectionInfo connectionInfo, java.lang.String host, java.net.InetAddress inetAddress, int port)
Performs any appropriate log processing that may be needed when a connection is established.- Parameters:
connectionInfo
- Information about the connection that has been established. It will not benull
.host
- The string representation of the address to which the connection was established. It will not benull
.inetAddress
- TheInetAddress
representation of the address to which the connection was established. It will not benull
.port
- The port to which the connection was established.
-
logConnectFailure
public void logConnectFailure(LDAPConnectionInfo connectionInfo, java.lang.String host, int port, LDAPException connectException)
Performs any appropriate log processing that may be needed when an attempt to establish a connection fails.- Parameters:
connectionInfo
- Information about the connection that has been established. It will not benull
.host
- The string representation of the address to which the connection was established. It will not benull
.port
- The port to which the connection was established.connectException
- An exception with information about the failed connection attempt. It will not benull
.
-
logDisconnect
public void logDisconnect(LDAPConnectionInfo connectionInfo, java.lang.String host, int port, DisconnectType disconnectType, java.lang.String disconnectMessage, java.lang.Throwable disconnectCause)
Performs any appropriate log processing that may be needed when a connection is disconnected, regardless of whether the disconnect was initiated by the client or server.- Parameters:
connectionInfo
- Information about the connection that has been disconnected. It will not benull
.host
- The string representation of the address to which the connection was established. It will not benull
.port
- The port to which the connection was established.disconnectType
- The general reason for the disconnect. It will not benull
.disconnectMessage
- A human-readable message with additional information about the disconnect. It may benull
if no additional information is available.disconnectCause
- AThrowable
that may have been responsible for the disconnect. It may benull
if the disconnect was not caused by an exception or error.
-
logAbandonRequest
public void logAbandonRequest(LDAPConnectionInfo connectionInfo, int messageID, int messageIDToAbandon, java.util.List<Control> requestControls)
Performs any appropriate log processing that may be needed when an abandon request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the abandon request. It will not benull
.messageID
- The LDAP message ID for the abandon request that is to be sent.messageIDToAbandon
- The LDAP message ID for the request that is to be abandoned.requestControls
- The list of controls included in the abandon request.
-
logAddRequest
public void logAddRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyAddRequest addRequest)
Performs any appropriate log processing that may be needed when an add request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the add request. It will not benull
.messageID
- The LDAP message ID for the add request that is to be sent.addRequest
- The add request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logAddResult
public void logAddResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult addResult)
Performs any appropriate log processing that may be needed when an add response is received over a connection, or when an exception is caught while waiting for or attempting to decode an add response.- Parameters:
connectionInfo
- Information about the connection used to send the add request. It will not benull
.requestMessageID
- The LDAP message ID for the associated add request.addResult
- The add result that was received from the server, or that was generated from an exception. It will not benull
.
-
logBindRequest
public void logBindRequest(LDAPConnectionInfo connectionInfo, int messageID, SimpleBindRequest bindRequest)
Performs any appropriate log processing that may be needed when a simple bind request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the bind request. It will not benull
.messageID
- The LDAP message ID for the add request that is to be sent.bindRequest
- The bind request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logBindRequest
public void logBindRequest(LDAPConnectionInfo connectionInfo, int messageID, SASLBindRequest bindRequest)
Performs any appropriate log processing that may be needed when a SASL bind request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the bind request. It will not benull
.messageID
- The LDAP message ID for the add request that is to be sent.bindRequest
- The bind request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logBindResult
public void logBindResult(LDAPConnectionInfo connectionInfo, int requestMessageID, BindResult bindResult)
Performs any appropriate log processing that may be needed when a bind response is received over a connection, or when an exception is caught while waiting for or attempting to decode a bind response.- Parameters:
connectionInfo
- Information about the connection used to send the add request. It will not benull
.requestMessageID
- The LDAP message ID for the associated add request.bindResult
- The bind result that was received from the server, or that was generated from an exception. It will not benull
.
-
logCompareRequest
public void logCompareRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyCompareRequest compareRequest)
Performs any appropriate log processing that may be needed when a compare request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the compare request. It will not benull
.messageID
- The LDAP message ID for the compare request that is to be sent.compareRequest
- The compare request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logCompareResult
public void logCompareResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult compareResult)
Performs any appropriate log processing that may be needed when a compare response is received over a connection, or when an exception is caught while waiting for or attempting to decode a compare response.- Parameters:
connectionInfo
- Information about the connection used to send the compare request. It will not benull
.requestMessageID
- The LDAP message ID for the associated compare request.compareResult
- The compare result that was received from the server, or that was generated from an exception. It will not benull
.
-
logDeleteRequest
public void logDeleteRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyDeleteRequest deleteRequest)
Performs any appropriate log processing that may be needed when a delete request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the delete request. It will not benull
.messageID
- The LDAP message ID for the delete request that is to be sent.deleteRequest
- The delete request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logDeleteResult
public void logDeleteResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult deleteResult)
Performs any appropriate log processing that may be needed when a delete response is received over a connection, or when an exception is caught while waiting for or attempting to decode a delete response.- Parameters:
connectionInfo
- Information about the connection used to send the delete request. It will not benull
.requestMessageID
- The LDAP message ID for the associated delete request.deleteResult
- The delete result that was received from the server, or that was generated from an exception. It will not benull
.
-
logExtendedRequest
public void logExtendedRequest(LDAPConnectionInfo connectionInfo, int messageID, ExtendedRequest extendedRequest)
Performs any appropriate log processing that may be needed when an extended request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the extended request. It will not benull
.messageID
- The LDAP message ID for the extended request that is to be sent.extendedRequest
- The extended request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logExtendedResult
public void logExtendedResult(LDAPConnectionInfo connectionInfo, int requestMessageID, ExtendedResult extendedResult)
Performs any appropriate log processing that may be needed when an extended response is received over a connection, or when an exception is caught while waiting for or attempting to decode an extended response.- Parameters:
connectionInfo
- Information about the connection used to send the extended request. It will not benull
.requestMessageID
- The LDAP message ID for the associated extended request.extendedResult
- The extended result that was received from the server, or that was generated from an exception. It will not benull
.
-
logModifyRequest
public void logModifyRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyModifyRequest modifyRequest)
Performs any appropriate log processing that may be needed when a modify request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the modify request. It will not benull
.messageID
- The LDAP message ID for the modify request that is to be sent.modifyRequest
- The modify request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logModifyResult
public void logModifyResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult modifyResult)
Performs any appropriate log processing that may be needed when a modify response is received over a connection, or when an exception is caught while waiting for or attempting to decode a modify response.- Parameters:
connectionInfo
- Information about the connection used to send the modify request. It will not benull
.requestMessageID
- The LDAP message ID for the associated modify request.modifyResult
- The modify result that was received from the server, or that was generated from an exception. It will not benull
.
-
logModifyDNRequest
public void logModifyDNRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlyModifyDNRequest modifyDNRequest)
Performs any appropriate log processing that may be needed when a modify DN request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the modify DN request. It will not benull
.messageID
- The LDAP message ID for the modify DN request that is to be sent.modifyDNRequest
- The modify DN request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logModifyDNResult
public void logModifyDNResult(LDAPConnectionInfo connectionInfo, int requestMessageID, LDAPResult modifyDNResult)
Performs any appropriate log processing that may be needed when a modify DN response is received over a connection, or when an exception is caught while waiting for or attempting to decode a modify DN response.- Parameters:
connectionInfo
- Information about the connection used to send the modify DN request. It will not benull
.requestMessageID
- The LDAP message ID for the associated modify DN request.modifyDNResult
- The modify DN result that was received from the server, or that was generated from an exception. It will not benull
.
-
logSearchRequest
public void logSearchRequest(LDAPConnectionInfo connectionInfo, int messageID, ReadOnlySearchRequest searchRequest)
Performs any appropriate log processing that may be needed when a search request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the search request. It will not benull
.messageID
- The LDAP message ID for the search request that is to be sent.searchRequest
- The search request that is to be sent. This is provided only for informational purposes, and it must not be altered in any way. It will not benull
.
-
logSearchEntry
public void logSearchEntry(LDAPConnectionInfo connectionInfo, int requestMessageID, SearchResultEntry searchEntry)
Performs any appropriate log processing that may be needed when a search result entry response is received over a connection.- Parameters:
connectionInfo
- Information about the connection used to send the search request. It will not benull
.requestMessageID
- The LDAP message ID for the associated search request.searchEntry
- The search result entry that was received from the server. It will not benull
.
-
logSearchReference
public void logSearchReference(LDAPConnectionInfo connectionInfo, int requestMessageID, SearchResultReference searchReference)
Performs any appropriate log processing that may be needed when a search result reference response is received over a connection.- Parameters:
connectionInfo
- Information about the connection used to send the search request. It will not benull
.requestMessageID
- The LDAP message ID for the associated search request.searchReference
- The search result reference that was received from the server. It will not benull
.
-
logSearchResult
public void logSearchResult(LDAPConnectionInfo connectionInfo, int requestMessageID, SearchResult searchResult)
Performs any appropriate log processing that may be needed when a search result done response is received over a connection, or when an exception is caught while waiting for or attempting to decode a search result.- Parameters:
connectionInfo
- Information about the connection used to send the search request. It will not benull
.requestMessageID
- The LDAP message ID for the associated search request.searchResult
- The search result that was received from the server, or that was generated from an exception. It will not benull
.
-
logUnbindRequest
public void logUnbindRequest(LDAPConnectionInfo connectionInfo, int messageID, java.util.List<Control> requestControls)
Performs any appropriate log processing that may be needed when an unbind request is sent over a connection.- Parameters:
connectionInfo
- Information about the connection that will be used to send the unbind request. It will not benull
.messageID
- The LDAP message ID for the unbind request that is to be sent.requestControls
- The list of controls included in the unbind request.
-
logIntermediateResponse
public void logIntermediateResponse(LDAPConnectionInfo connectionInfo, int messageID, IntermediateResponse intermediateResponse)
Performs any appropriate log processing that may be needed when an intermediate response message is received over a connection.- Parameters:
connectionInfo
- Information about the connection over which the intermediate response was received. It will not benull
.messageID
- The LDAP message ID for the intermediate response message.intermediateResponse
- The intermediate response message that was received.
-
-