public final class AnonymousProcessService extends Object implements RequestHandler
ProgressStage
configurations, handling any required client interactions.Constructor and Description |
---|
AnonymousProcessService(ProcessInstanceConfig config,
ProgressStageProvider progressStageProvider,
SnapshotTokenHandlerFactory tokenHandlerFactory,
ProcessStore processStore,
ClassLoader classLoader)
Initialises the anonymous process service with the passed config.
|
Modifier and Type | Method and Description |
---|---|
Promise<ActionResponse,ResourceException> |
handleAction(Context context,
ActionRequest request)
Handles performing an action on a resource, and optionally returns an
associated result.
|
Promise<ResourceResponse,ResourceException> |
handleRead(Context context,
ReadRequest request)
Reads a JSON resource, returning a
Promise that will be
completed when the resource has been read. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleCreate, handleDelete, handlePatch, handleQuery, handleUpdate
@Inject public AnonymousProcessService(ProcessInstanceConfig config, ProgressStageProvider progressStageProvider, SnapshotTokenHandlerFactory tokenHandlerFactory, ProcessStore processStore, ClassLoader classLoader)
config
- service configurationprogressStageProvider
- progress stage providertokenHandlerFactory
- snapshot token handler factoryprocessStore
- store for locally persisted stateclassLoader
- class loader used for dynamic stage class instantiationpublic Promise<ResourceResponse,ResourceException> handleRead(Context context, ReadRequest request)
RequestHandler
Promise
that will be
completed when the resource has been read.
Read expects failure exceptions as follows:
ForbiddenException
if access to the resource is forbidden.
NotSupportedException
if the requested functionality is not
implemented/supported
BadRequestException
if the passed identifier or filter is
invalid
NotFoundException
if the specified resource could not be
found.
handleRead
in interface RequestHandler
context
- The request server context, such as associated principal.request
- The read request.Promise
containing the result of the operation.public Promise<ActionResponse,ResourceException> handleAction(Context context, ActionRequest request)
RequestHandler
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 returned Promise
must
be completed with the exception.
Action expects failure exceptions as follows: ForbiddenException
if access to the resource is forbidden. NotSupportedException
if
the requested functionality is not implemented/supported
BadRequestException
if the passed identifier, parameters or
filter is invalid NotFoundException
if the specified resource
could not be found.
handleAction
in interface RequestHandler
context
- The request server context, such as associated principal.request
- The action request.Promise
containing the result of the operation.Copyright © 2010-2018, ForgeRock All Rights Reserved.