@NotExtensible @ThreadSafety(level=INTERFACE_NOT_THREADSAFE) public interface OperationContext
Modifier and Type | Method and Description |
---|---|
void |
addCustomLogElement(java.lang.String key,
java.lang.Object value)
Specifies an additional log element for this operation, which
should be written to the log.
|
void |
appendAdditionalLogMessage(java.lang.String message)
Indicates that the provided message should be included in the access log
message for the operation but should not be returned to the client.
|
void |
deregisterOperationCompletedListener(RegisteredOperationCompletedListener listener)
Deregisters the provided server operation completed listener with the
server.
|
java.lang.Object |
getAttachment(java.lang.String name)
Retrieves the object attached to the associated operation with the given
name.
|
java.lang.String |
getAuthorizationDN()
Retrieves the DN of the user as whom the request is authorized.
|
java.lang.String |
getClientConnectionPolicyDN()
Retrieves the DN of the entry that defines the client connection policy to
which the associated client connection is assigned.
|
java.lang.String |
getClientConnectionPolicyName()
Retrieves the name of the client connection policy to which the associated
client connection is assigned.
|
ClientContext |
getClientContext()
Retrieves information about the client that requested this operation.
|
long |
getConnectionID()
Retrieves the identifier that has been assigned to the associated client
connection.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getCustomLogElements()
Returns any additional log elements for this operation, which
should be written to the log.
|
InternalConnection |
getInternalRootConnection()
Retrieves an internal connection that is authenticated as a root user
that is not subject to access control.
|
InternalConnection |
getInternalRootConnection(boolean usePolicyFromConnection)
Retrieves an internal connection that is authenticated as a root user
that is not subject to access control.
|
InternalConnection |
getInternalUserConnection()
Retrieves an internal connection that is authenticated as the same user
that requested this operation and may be subject to access control.
|
InternalConnection |
getInternalUserConnection(boolean usePolicyFromConnection)
Retrieves an internal connection that is authenticated as the same user
that requested this operation and may be subject to access control.
|
int |
getMessageID()
Retrieves the message ID for this operation from the client request.
|
long |
getOperationID()
Retrieves the identifier that has been assigned to this operation for the
associated client connection.
|
OperationType |
getOperationType()
Retrieves the operation type for this operation.
|
Request |
getRequest()
Retrieves the request for the associated operation.
|
ServerContext |
getServerContext()
Retrieves information about the server in which this operation is being
processed.
|
boolean |
isAdministrativeOperation()
Indicates whether this is an administrative operation.
|
boolean |
isInternalOperation()
Indicates whether this operation was initiated within the server rather
than by an external client.
|
boolean |
isReplicationOperation()
Indicates whether this operation was initiated via replication rather than
within the local server.
|
boolean |
isSecure()
Indicates whether this operation was requested over a secure connection.
|
RegisteredOperationCompletedListener |
registerOperationCompletedListener(OperationCompletedListener listener)
Registers the provided listener to be notified when the server completes
an operation.
|
void |
setAttachment(java.lang.String name,
java.lang.Object value)
Sets an attachment for the associated operation.
|
java.lang.String |
toString()
Retrieves a string representation of this operation.
|
long getConnectionID()
long getOperationID()
int getMessageID()
OperationType getOperationType()
Request getRequest()
ServerContext getServerContext()
boolean isInternalOperation()
true
if this operation was initiated within the server, or
false
if it was requested by an external client.boolean isAdministrativeOperation()
StartAdministrativeSessionExtendedRequest
extended request was
used on the connection, or the
AdministrativeOperationRequestControl
request control was used on
the operation.true
if this operation is an administrative operation.boolean isReplicationOperation()
true
if this operation was initiated via replication, or
false
if it was initiated locally within this server.java.lang.String getAuthorizationDN()
java.lang.Object getAttachment(java.lang.String name)
name
- The case-sensitive name of the attachment to retrieve. It
must not be null
.null
if the operation does
not have an attachment with the provided name.void setAttachment(java.lang.String name, java.lang.Object value)
name
- The name of the attachment to set. It must not be
null
.value
- The value to set for the attachment. It may be null
if any existing attachment with the specified name should be
removed.ClientContext getClientContext()
java.lang.String getClientConnectionPolicyName()
java.lang.String getClientConnectionPolicyDN()
boolean isSecure()
true
if this operation was requested over a secure
connection, or false
if not.InternalConnection getInternalUserConnection() throws LDAPException
getInternalUserConnection(boolean)
method.LDAPException
- If a problem occurs while attempting to obtain or
authenticate the connection.InternalConnection getInternalUserConnection(boolean usePolicyFromConnection) throws LDAPException
usePolicyFromConnection
- If true
, the internal connection
will use the same client connection policy
as the associated client connection. If
false
, the internal connection
will use the server's default client
connection policy for internal
connections.LDAPException
- If a problem occurs while attempting to obtain or
authenticate the connection.InternalConnection getInternalRootConnection()
getInternalRootConnection(boolean)
method.InternalConnection getInternalRootConnection(boolean usePolicyFromConnection)
usePolicyFromConnection
- If true
, the internal connection
will use the same client connection policy
as the associated client connection. If
false
, the internal connection
will use the server's default client
connection policy for internal
connections.java.lang.String toString()
toString
in class java.lang.Object
void addCustomLogElement(java.lang.String key, java.lang.Object value)
key
- The key of the log element being addedvalue
- The value of the log element being addedjava.util.Map<java.lang.String,java.util.List<java.lang.String>> getCustomLogElements()
void appendAdditionalLogMessage(java.lang.String message)
message
- The message to include in the log message. It must not
be null
.RegisteredOperationCompletedListener registerOperationCompletedListener(OperationCompletedListener listener)
listener
- The server operation completed listener to be registered.
It must not be null
.void deregisterOperationCompletedListener(RegisteredOperationCompletedListener listener)
listener
- The server operation completed listener to be
deregistered. It must not be null
.