Class JobsResource
- java.lang.Object
-
- org.glassfish.admin.rest.resources.AbstractResource
-
- org.glassfish.admin.rest.composite.CompositeResource
-
- org.glassfish.admin.rest.resources.composite.JobsResource
-
- All Implemented Interfaces:
RestResource
@Service @Path("/jobs") public class JobsResource extends CompositeResource
This resource queries for the system for all detached jobs.Example Interactions
View the detached jobs
$ curl --user admin:admin123 -v \ -H Accept:application/vnd.oracle.glassfish+json \ -H Content-Type:application/vnd.oracle.glassfish+json \ -H X-Requested-By:MyClient \ http://localhost:4848/management/jobs HTTP/1.1 200 OK { "items": [{ "exitCode": "COMPLETED", "jobId": "1", "jobName": "load-sdp", "jobState": "COMPLETED", "executionDate": "Wed Jan 02 11:36:38 CST 2013", "message": "SDP loaded with name nucleusSDP.", "user": "admin" }], "metadata": [{"id": "http:\/\/localhost:4848\/management\/jobs\/id\/1"}] }- Author:
- jdlee
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.glassfish.admin.rest.composite.CompositeResource
CompositeResource.CommandInvoker, CompositeResource.CreateCommandInvoker
-
-
Field Summary
-
Fields inherited from class org.glassfish.admin.rest.composite.CompositeResource
compositeUtil, CONSUMES_TYPE, DETACHED, DETACHED_DEFAULT, EXCLUDE, INCLUDE, THREAD_POOL_CORE, THREAD_POOL_MAX
-
Fields inherited from class org.glassfish.admin.rest.resources.AbstractResource
locatorBridge, logger, requestHeaders, securityContext, serviceLocator, subjectRef, uriInfo
-
-
Constructor Summary
Constructors Constructor Description JobsResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getCommandName()
RestCollectionResponseBody<Job>
getItems(boolean currentUser, String include, String exclude)
The GET method on this resource returns a list of Job entities that represent each recent or current job known to this GlassFish instance.JobResource
getJobResource()
protected ParameterMap
getParameters()
-
Methods inherited from class org.glassfish.admin.rest.composite.CompositeResource
accepted, accepted, accepted, accepted, act, acted, acted, acted, actSse, addActionResourceLink, addResourceLink, badRequest, badRequest, badRequest, badRequest, create, created, created, created, created, createSse, deleted, deleted, deleted, executeCommand, executeDeleteCommand, executeDeleteCommand, executeDeleteCommandManaged, executeReadCommand, executeReadCommand, executeSseCommand, executeSseCommand, executeSseCommand, executeWriteCommand, executeWriteCommand, executeWriteCommandManaged, filterModel, filterModel, filterModel, generateDefaultName, getChildItemUri, getCollectionChildParentUri, getCompositeUtil, getExecutorService, getFilter, getFilter, getJsonModel, getLocale, getParentUri, getPathParam, getResponse, getResponse, getSubResource, getSubUri, getTypedModel, getUri, includeResourceLinks, launchDetachedCommand, newModel, newTemplate, notFound, ok, parameterMap, responseBody, restCollectionResponseBody, restCollectionResponseBody, restModelResponseBody, restModelResponseBody, restModelResponseBody, setSubjectRef, updated, updated, updated
-
Methods inherited from class org.glassfish.admin.rest.resources.AbstractResource
getAuthenticatedUser, getSubject
-
-
-
-
Method Detail
-
getItems
@GET public RestCollectionResponseBody<Job> getItems(@QueryParam("currentUser") @DefaultValue("false") boolean currentUser, @QueryParam("__includeFields") String include, @QueryParam("__excludeFields") String exclude) throws Exception
The GET method on this resource returns a list of Job entities that represent each recent or current job known to this GlassFish instance.Roles: PaasAdmin, TenantAdmin
- Parameters:
currentUser
- Optional query parameter to restrict the set of returnsJob
objects to those for the current user- Returns:
- A collection of Job entities which contains information for each job resource.
For each job returned, the
jobId
field can be used to format the URI to interact with a specific job. - Throws:
Exception
-
getJobResource
@Path("id/{jobId}") public JobResource getJobResource()
-
getCommandName
protected String getCommandName()
-
getParameters
protected ParameterMap getParameters()
-
-