com.unboundid.ldap.sdk.experimental
Class DraftChuLDAPLogSchema00Entry

java.lang.Object
  extended by com.unboundid.ldap.sdk.Entry
      extended by com.unboundid.ldap.sdk.ReadOnlyEntry
          extended by com.unboundid.ldap.sdk.experimental.DraftChuLDAPLogSchema00Entry
All Implemented Interfaces:
LDIFRecord, java.io.Serializable
Direct Known Subclasses:
DraftChuLDAPLogSchema00AbandonEntry, DraftChuLDAPLogSchema00AddEntry, DraftChuLDAPLogSchema00BindEntry, DraftChuLDAPLogSchema00CompareEntry, DraftChuLDAPLogSchema00DeleteEntry, DraftChuLDAPLogSchema00ExtendedEntry, DraftChuLDAPLogSchema00ModifyDNEntry, DraftChuLDAPLogSchema00ModifyEntry, DraftChuLDAPLogSchema00SearchEntry, DraftChuLDAPLogSchema00UnbindEntry

@NotExtensible
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public abstract class DraftChuLDAPLogSchema00Entry
extends ReadOnlyEntry

This class serves as the base class for entries that hold information about operations processed by an LDAP server, much like LDAP-accessible access log messages. The format for the entries used in this implementation is described in draft-chu-ldap-logschema-00.

See Also:
Serialized Form

Field Summary
static java.lang.String ATTR_AUTHORIZATION_IDENTITY_DN
          The name of the attribute used to hold the DN of the authorization identity for the operation.
static java.lang.String ATTR_DIAGNOSTIC_MESSAGE
          The name of the attribute used to hold the diagnostic message the server included in the response to the client.
static java.lang.String ATTR_OPERATION_TYPE
          The name of the attribute used to hold the type of operation that was processed.
static java.lang.String ATTR_PROCESSING_END_TIME
          The name of the attribute used to hold the time the server completed processing the operation.
static java.lang.String ATTR_PROCESSING_START_TIME
          The name of the attribute used to hold the time the server started processing the operation.
static java.lang.String ATTR_REFERRAL_URL
          The name of the attribute used to hold a referral URL the server included in the response to the client.
static java.lang.String ATTR_REQUEST_CONTROL
          The name of the attribute used to hold information about a request control included in the request received from the client.
static java.lang.String ATTR_RESPONSE_CONTROL
          The name of the attribute used to hold information about a response control included in the result returned to the client.
static java.lang.String ATTR_RESULT_CODE
          The name of the attribute used to hold the integer value of the result code the server included in the response to the client.
static java.lang.String ATTR_SESSION_ID
          The name of the attribute used to hold a session identifier for a sequence of operations received on the same connection.
static java.lang.String ATTR_TARGET_ENTRY_DN
          The name of the attribute used to hold the DN of the entry targeted by the operation.
 
Method Summary
static DraftChuLDAPLogSchema00Entry decode(Entry entry)
          Decodes the provided entry as an access log entry of the appropriate type.
 java.lang.String getAuthorizationIdentityDN()
          Retrieves the DN of the account that served as the authorization identity for the operation represented by this access log entry, if any.
 java.lang.String getDiagnosticMessage()
          Retrieves the diagnostic message for the operation represented by this access log entry, if any.
 OperationType getOperationType()
          Retrieves the type of operation represented by this access log entry.
 java.util.Date getProcessingEndTimeDate()
          Retrieves a parsed representation of the time that the server completed processing the operation represented by this access log entry, if available.
 java.lang.String getProcessingEndTimeString()
          Retrieves the string representation of the time that the server completed processing the operation represented by this access log entry, if available.
 java.util.Date getProcessingStartTimeDate()
          Retrieves a parsed representation of the time that the server started processing the operation represented by this access log entry.
 java.lang.String getProcessingStartTimeString()
          Retrieves the string representation of the time that the server started processing the operation represented by this access log entry.
 java.util.List<java.lang.String> getReferralURLs()
          Retrieves the list of referral URLs for the operation represented by this access log entry, if any.
 java.util.List<Control> getRequestControls()
          Retrieves a list of the request controls for the operation represented by this access log entry, if any.
 java.util.List<Control> getResponseControls()
          Retrieves a list of the response controls for the operation represented by this access log entry, if any.
 ResultCode getResultCode()
          Retrieves the result code for the operation represented by this access log entry, if any.
 java.lang.String getSessionID()
          Retrieves the session identifier that the server assigned to the operation represented by this access log entry and can be used to correlate that operation with other operations requested on the same client connection.
 java.lang.String getTargetEntryDN()
          Retrieves the DN of the entry targeted by by the operation represented by this access log entry, if available.
 LDAPResult toLDAPResult()
          Retrieves an LDAPResult object that represents the server response described by this access log entry, if any.
 
Methods inherited from class com.unboundid.ldap.sdk.ReadOnlyEntry
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeAttributeValues, removeAttributeValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setDN, setDN
 
Methods inherited from class com.unboundid.ldap.sdk.Entry
addAttribute, applyModifications, applyModifications, applyModifyDN, applyModifyDN, diff, diff, duplicate, equals, getAttribute, getAttribute, getAttributes, getAttributesWithOptions, getAttributeValue, getAttributeValueAsBoolean, getAttributeValueAsDate, getAttributeValueAsDN, getAttributeValueAsInteger, getAttributeValueAsLong, getAttributeValueByteArrays, getAttributeValueBytes, getAttributeValues, getDN, getObjectClassAttribute, getObjectClassValues, getParentDN, getParentDNString, getParsedDN, getRDN, getSchema, hasAttribute, hasAttribute, hasAttribute, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasAttributeValue, hashCode, hasObjectClass, intersectEntries, matchesBaseAndScope, matchesBaseAndScope, mergeEntries, removeAttributeValue, removeAttributeValue, setAttribute, toLDIF, toLDIF, toLDIF, toLDIF, toLDIFString, toLDIFString, toLDIFString, toLDIFString, toString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_AUTHORIZATION_IDENTITY_DN

public static final java.lang.String ATTR_AUTHORIZATION_IDENTITY_DN
The name of the attribute used to hold the DN of the authorization identity for the operation.

See Also:
Constant Field Values

ATTR_DIAGNOSTIC_MESSAGE

public static final java.lang.String ATTR_DIAGNOSTIC_MESSAGE
The name of the attribute used to hold the diagnostic message the server included in the response to the client.

See Also:
Constant Field Values

ATTR_OPERATION_TYPE

public static final java.lang.String ATTR_OPERATION_TYPE
The name of the attribute used to hold the type of operation that was processed. For extended operation, the value will be "extended" followed by the OID of the extended request (e.g., "extended1.3.6.1.4.1.1466.20037" to indicate the StartTLS extended request). For all other operation types, this will be simply the name of the operation: abandon, add, bind, compare, delete, modify, modrdn, search, or unbind.

See Also:
Constant Field Values

ATTR_PROCESSING_END_TIME

public static final java.lang.String ATTR_PROCESSING_END_TIME
The name of the attribute used to hold the time the server completed processing the operation. Values will be in generalized time format, but may be of a very high precision to ensure that each log entry has a unique end time.

See Also:
Constant Field Values

ATTR_PROCESSING_START_TIME

public static final java.lang.String ATTR_PROCESSING_START_TIME
The name of the attribute used to hold the time the server started processing the operation. Values will be in generalized time format, but may be of a very high precision to ensure that each log entry has a unique start time.

See Also:
Constant Field Values

ATTR_REFERRAL_URL

public static final java.lang.String ATTR_REFERRAL_URL
The name of the attribute used to hold a referral URL the server included in the response to the client.

See Also:
Constant Field Values

ATTR_REQUEST_CONTROL

public static final java.lang.String ATTR_REQUEST_CONTROL
The name of the attribute used to hold information about a request control included in the request received from the client.

See Also:
Constant Field Values

ATTR_RESPONSE_CONTROL

public static final java.lang.String ATTR_RESPONSE_CONTROL
The name of the attribute used to hold information about a response control included in the result returned to the client.

See Also:
Constant Field Values

ATTR_RESULT_CODE

public static final java.lang.String ATTR_RESULT_CODE
The name of the attribute used to hold the integer value of the result code the server included in the response to the client.

See Also:
Constant Field Values

ATTR_SESSION_ID

public static final java.lang.String ATTR_SESSION_ID
The name of the attribute used to hold a session identifier for a sequence of operations received on the same connection.

See Also:
Constant Field Values

ATTR_TARGET_ENTRY_DN

public static final java.lang.String ATTR_TARGET_ENTRY_DN
The name of the attribute used to hold the DN of the entry targeted by the operation. For a search operation, this will be the search base DN.

See Also:
Constant Field Values
Method Detail

getOperationType

public final OperationType getOperationType()
Retrieves the type of operation represented by this access log entry.

Returns:
The type of operation represented by this access log entry.

getTargetEntryDN

public final java.lang.String getTargetEntryDN()
Retrieves the DN of the entry targeted by by the operation represented by this access log entry, if available. Some types of operations, like abandon and extended operations, will not have a target entry DN. For a search operation, this will be the base DN for the search request. For a modify DN operation, this will be the DN of the entry before any processing was performed.

Returns:
The DN of the entry targeted by the operation represented by this access log entry, or null if no DN is available.

getProcessingStartTimeString

public final java.lang.String getProcessingStartTimeString()
Retrieves the string representation of the time that the server started processing the operation represented by this access log entry. Note that the string representation of this start time may have a different precision than the parsed start time returned by the getProcessingStartTimeDate() method.

Returns:
The string representation of the time that the server started processing the operation represented by this access log entry.

getProcessingStartTimeDate

public final java.util.Date getProcessingStartTimeDate()
Retrieves a parsed representation of the time that the server started processing the operation represented by this access log entry. Note that this parsed representation may have a different precision than the start time string returned by the getProcessingStartTimeString() method.

Returns:
A parsed representation of the time that the server started processing the operation represented by this access log entry.

getProcessingEndTimeString

public final java.lang.String getProcessingEndTimeString()
Retrieves the string representation of the time that the server completed processing the operation represented by this access log entry, if available. Note that the string representation of this end time may have a different precision than the parsed end time returned by the getProcessingEndTimeDate() method.

Returns:
The string representation of the time that the server completed processing the operation represented by this access log entry, or null if no end time is available.

getProcessingEndTimeDate

public final java.util.Date getProcessingEndTimeDate()
Retrieves a parsed representation of the time that the server completed processing the operation represented by this access log entry, if available. Note that this parsed representation may have a different precision than the end time string returned by the getProcessingEndTimeString() method.

Returns:
A parsed representation of the time that the server completed processing the operation represented by this access log entry.

getSessionID

public final java.lang.String getSessionID()
Retrieves the session identifier that the server assigned to the operation represented by this access log entry and can be used to correlate that operation with other operations requested on the same client connection. The server will assign a unique session identifier to each client connection, and all requests received on that connection will share the same session ID.

Returns:
The session identifier that the server assigned to the operation represented by this access log entry.

getRequestControls

public final java.util.List<Control> getRequestControls()
Retrieves a list of the request controls for the operation represented by this access log entry, if any.

Returns:
A list of the request controls for the operation represented by this access log entry, or an empty list if there were no request controls included in the access log entry.

getResultCode

public final ResultCode getResultCode()
Retrieves the result code for the operation represented by this access log entry, if any.

Returns:
The result code for the operation represented by this access log entry, or null if no result code was included in the access log entry.

getDiagnosticMessage

public final java.lang.String getDiagnosticMessage()
Retrieves the diagnostic message for the operation represented by this access log entry, if any.

Returns:
The diagnostic message for the operation represented by this access log entry, or null if no result code was included in the access log entry.

getReferralURLs

public final java.util.List<java.lang.String> getReferralURLs()
Retrieves the list of referral URLs for the operation represented by this access log entry, if any.

Returns:
The list of referral URLs for the operation represented by this access log entry, or an empty list if no referral URLs were included in the access log entry.

getResponseControls

public final java.util.List<Control> getResponseControls()
Retrieves a list of the response controls for the operation represented by this access log entry, if any.

Returns:
A list of the response controls for the operation represented by this access log entry, or an empty list if there were no response controls included in the access log entry.

getAuthorizationIdentityDN

public final java.lang.String getAuthorizationIdentityDN()
Retrieves the DN of the account that served as the authorization identity for the operation represented by this access log entry, if any.

Returns:
The DN of the account that served as the authorization identity for the operation represented by this access log entry, or null if the authorization identity is not available.

toLDAPResult

public final LDAPResult toLDAPResult()
Retrieves an LDAPResult object that represents the server response described by this access log entry, if any. Note that for some types of operations, like abandon and unbind operations, the server will not return a result to the client.

Returns:
An LDAPResult object that represents the server response described by this access log entry, or null if no response information is available.

decode

public static DraftChuLDAPLogSchema00Entry decode(Entry entry)
                                           throws LDAPException
Decodes the provided entry as an access log entry of the appropriate type.

Parameters:
entry - The entry to decode as an access log entry. It must not be null.
Returns:
The decoded access log entry.
Throws:
LDAPException - If the provided entry cannot be decoded as a valid access log entry as per the specification contained in draft-chu-ldap-logschema-00.