Class 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
    • Constructor Detail

      • JobsResource

        public JobsResource()
    • 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 returns Job 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()