@PublicAPI(stability=UNCOMMITTED, mayInstantiate=false, mayExtend=false, mayInvoke=true) public interface PluginOperation
Modifier and Type | Method and Description |
---|---|
void |
checkIfCanceled(boolean signalTooLate)
Checks to see if this operation requested to cancel in which case
CanceledOperationException will be thrown.
|
void |
disconnectClient(DisconnectReason disconnectReason,
boolean sendNotification,
LocalizableMessage message)
Terminates the client connection being used to process this
operation.
|
<T> T |
getAttachment(String name)
Retrieves the attachment with the specified name.
|
Map<String,Object> |
getAttachments()
Retrieves the set of attachments defined for this operation, as a
mapping between the attachment name and the associated object.
|
ClientConnection |
getClientConnection()
Retrieves the client connection with which this operation is
associated.
|
long |
getConnectionID()
Retrieves the unique identifier that is assigned to the client
connection that submitted this operation.
|
int |
getMessageID()
Retrieves the message ID assigned to this operation.
|
long |
getOperationID()
Retrieves the operation ID for this operation.
|
OperationType |
getOperationType()
Retrieves the operation type for this operation.
|
long |
getProcessingStartTime()
Retrieves the time that processing started for this operation.
|
<T extends Control> |
getRequestControl(ControlDecoder<T> d)
Retrieves a control included in the request from the client.
|
List<Control> |
getRequestControls()
Retrieves the set of controls included in the request from the
client.
|
List<Control> |
getResponseControls()
Retrieves the set of controls to include in the response to the
client.
|
boolean |
isInternalOperation()
Indicates whether this is an internal operation rather than one
that was requested by an external client.
|
boolean |
isSynchronizationOperation()
Indicates whether this is a synchronization operation rather than
one that was requested by an external client.
|
<T> T |
removeAttachment(String name)
Removes the attachment with the specified name.
|
<T> T |
setAttachment(String name,
Object value)
Sets the value of the specified attachment.
|
String |
toString()
Retrieves a string representation of this operation.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this operation to the provided
buffer.
|
OperationType getOperationType()
ClientConnection getClientConnection()
void disconnectClient(DisconnectReason disconnectReason, boolean sendNotification, LocalizableMessage message)
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 be null
if no
notification is to be sent.long getConnectionID()
long getOperationID()
int getMessageID()
List<Control> getRequestControls()
<T extends Control> T getRequestControl(ControlDecoder<T> d) throws DirectoryException
T
- The type of control requested.d
- The requested control's decoder.null
if the
control was not found.DirectoryException
- if an error occurs while decoding the control.List<Control> getResponseControls()
boolean isInternalOperation()
true
if this is an internal operation, or
false
if it is not.boolean isSynchronizationOperation()
true
if this is a data synchronization
operation, or false
if it is not.Map<String,Object> getAttachments()
<T> T getAttachment(String name)
T
- the type of the attached objectname
- The name for the attachment to retrieve. It will
be treated in a case-sensitive manner.null
if
it does not exist.<T> T removeAttachment(String name)
T
- the type of the attached objectname
- The name for the attachment to remove. It will be
treated in a case-sensitive manner.null
if
it does not exist.<T> T setAttachment(String name, Object value)
T
- the type of the attached objectname
- The name to use for the attachment.value
- The value to use for the attachment.null
if there was previously no
such attachment.long getProcessingStartTime()
void toString(StringBuilder buffer)
buffer
- The buffer into which a string representation of
this operation should be appended.void checkIfCanceled(boolean signalTooLate) throws CanceledOperationException
signalTooLate
- true
to signal that any further
cancel requests will be too late after
return from this call or false
otherwise.CanceledOperationException
- if this operation should
be cancelled.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.