Class TasksResource
java.lang.Object
is.galia.resource.AbstractResource
is.galia.resource.api.TasksResource
- All Implemented Interfaces:
Resource
Resource to enable an RPC-style asynchronous API for performing potentially
long-running tasks.
-
Field Summary
FieldsFields inherited from class is.galia.resource.AbstractResource
PUBLIC_IDENTIFIER_HEADER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doInit()
Initialization method, called after all necessary setters have been called but before any request handler method (likeAbstractResource.doGET()
etc.)void
doPOST()
Accepts a JSON object in the request entity with, at a minimum, a verb key with a value of one of theJsonSubTypes.Type
annotations onAPITask
.protected org.slf4j.Logger
Part of theResource
contract.Methods inherited from class is.galia.resource.AbstractResource
authenticateUsingBasic, decodePathComponent, destroy, doDELETE, doGET, doHEAD, doOPTIONS, doPATCH, doPUT, getCanonicalClientIPAddress, getCommonTemplateVars, getDelegate, getLocalBasePath, getPreferredMediaTypes, getPublicReference, getPublicRootReference, getRepresentationDisposition, getRequest, getRequestContext, getResponse, negotiateContentType, setRequest, setResponse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface is.galia.resource.Resource
destroy, doDELETE, doGET, doHEAD, doInit, doOPTIONS, doPATCH, doPUT, getRequest, getResponse, setRequest, setResponse
-
Field Details
-
URI_PATH
- See Also:
-
-
Constructor Details
-
TasksResource
public TasksResource()
-
-
Method Details
-
getLogger
protected org.slf4j.Logger getLogger()- Specified by:
getLogger
in classAbstractResource
-
getRoutes
Description copied from class:AbstractResource
Part of theResource
contract.- Specified by:
getRoutes
in interfaceResource
- Specified by:
getRoutes
in classAbstractResource
- Returns:
- All routes to which the instance responds.
-
doPOST
Accepts a JSON object in the request entity with, at a minimum, a verb key with a value of one of theJsonSubTypes.Type
annotations onAPITask
.- Specified by:
doPOST
in interfaceResource
- Overrides:
doPOST
in classAbstractResource
- Throws:
Exception
- upon any error. This may be aResourceException
to enable a custom status.- See Also:
-
doInit
Description copied from class:AbstractResource
Initialization method, called after all necessary setters have been called but before any request handler method (like
AbstractResource.doGET()
etc.)If an implementation class has anything to do with
image identifiers
, it should add the request identifier to therequest context
.Overrides must call
super
.- Overrides:
doInit
in classAbstractResource
- Throws:
Exception
- upon any error. This may be aResourceException
to enable a custom status.
-