Class AnonymousProcessService
- All Implemented Interfaces:
RequestHandler
ProgressStage
configurations, handling any required client interactions.- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionAnonymousProcessService(ProcessInstanceConfig config, ProgressStageProvider progressStageProvider, SnapshotTokenHandlerFactory tokenHandlerFactory, ProcessStore processStore, ClassLoader classLoader) Initialises the anonymous process service with the passed config. -
Method Summary
Modifier and TypeMethodDescriptionhandleAction(Context context, ActionRequest request) Handles performing an action on a resource, and optionally returns an associated result.handleRead(Context context, ReadRequest request) Reads a JSON resource, returning aPromisethat will be completed when the resource has been read.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.forgerock.json.resource.RequestHandler
handleCreate, handleDelete, handlePatch, handleQuery, handleUpdate
-
Constructor Details
-
AnonymousProcessService
@Inject public AnonymousProcessService(ProcessInstanceConfig config, ProgressStageProvider progressStageProvider, SnapshotTokenHandlerFactory tokenHandlerFactory, ProcessStore processStore, ClassLoader classLoader) Initialises the anonymous process service with the passed config.- Parameters:
config- service configurationprogressStageProvider- progress stage providertokenHandlerFactory- snapshot token handler factoryprocessStore- store for locally persisted stateclassLoader- class loader used for dynamic stage class instantiation
-
-
Method Details
-
handleRead
Description copied from interface:RequestHandlerReads a JSON resource, returning aPromisethat will be completed when the resource has been read.Read expects failure exceptions as follows:
ForbiddenExceptionif access to the resource is forbidden.NotSupportedExceptionif the requested functionality is not implemented/supportedBadRequestExceptionif the passed identifier or filter is invalidNotFoundExceptionif the specified resource could not be found.
- Specified by:
handleReadin interfaceRequestHandler- Parameters:
context- The request server context, such as associated principal.request- The read request.- Returns:
- A
Promisecontaining the result of the operation.
-
handleAction
public Promise<ActionResponse,ResourceException> handleAction(Context context, ActionRequest request) Description copied from interface:RequestHandlerHandles performing an action on a resource, and optionally returns an associated result. The execution of an action is allowed to incur side effects.Actions are parametric; a set of named parameters is provided as input to the action. The action result is a JSON object structure composed of basic Java types; its overall structure is defined by a specific implementation.
On completion, the action result (or null) must be used to complete the returned
Promise. On failure, the returnedPromisemust be completed with the exception.Action expects failure exceptions as follows:
ForbiddenExceptionif access to the resource is forbidden.NotSupportedExceptionif the requested functionality is not implemented/supportedBadRequestExceptionif the passed identifier, parameters or filter is invalidNotFoundExceptionif the specified resource could not be found.- Specified by:
handleActionin interfaceRequestHandler- Parameters:
context- The request server context, such as associated principal.request- The action request.- Returns:
- A
Promisecontaining the result of the operation.
-