Class ServiceRegistryEndpoint

java.lang.Object
org.opencastproject.serviceregistry.impl.endpoint.ServiceRegistryEndpoint

@Path("/services") public class ServiceRegistryEndpoint extends Object
Displays hosts and the service IDs they provide.
  • Field Details

    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The remote service maanger
    • serverUrl

      protected String serverUrl
      This server's URL
    • servicePath

      protected String servicePath
      The service path for this endpoint
  • Constructor Details

    • ServiceRegistryEndpoint

      public ServiceRegistryEndpoint()
  • Method Details

    • setServiceRegistry

      public void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry)
      Sets the service registry instance for delegation
    • setSecurityService

      public void setSecurityService(org.opencastproject.security.api.SecurityService securityService)
    • activate

      public void activate(org.osgi.service.component.ComponentContext cc)
      Callback from OSGi that is called when this service is activated.
      Parameters:
      cc - OSGi component context
    • getStatisticsAsJson

      @GET @Path("statistics.json") @Produces("application/json") public javax.ws.rs.core.Response getStatisticsAsJson()
    • getStatisticsAsXml

      @GET @Path("statistics.xml") @Produces("text/xml") public javax.ws.rs.core.Response getStatisticsAsXml() throws org.opencastproject.serviceregistry.api.ServiceRegistryException
      Throws:
      org.opencastproject.serviceregistry.api.ServiceRegistryException
    • sanitize

      @POST @Path("sanitize") public javax.ws.rs.core.Response sanitize(@FormParam("serviceType") String serviceType, @FormParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • register

      @POST @Path("register") @Produces("text/xml") public org.opencastproject.serviceregistry.api.JaxbServiceRegistration register(@FormParam("serviceType") String serviceType, @FormParam("host") String host, @FormParam("path") String path, @FormParam("jobProducer") boolean jobProducer)
    • unregister

      @POST @Path("unregister") public javax.ws.rs.core.Response unregister(@FormParam("serviceType") String serviceType, @FormParam("host") String host)
    • enableHost

      @POST @Path("enablehost") public javax.ws.rs.core.Response enableHost(@FormParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • disableHost

      @POST @Path("disablehost") public javax.ws.rs.core.Response disableHost(@FormParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • register

      @POST @Path("registerhost") public void register(@FormParam("host") String host, @FormParam("address") String address, @FormParam("nodeName") String nodeName, @FormParam("memory") long memory, @FormParam("cores") int cores, @FormParam("maxLoad") float maxLoad)
    • unregister

      @POST @Path("unregisterhost") public javax.ws.rs.core.Response unregister(@FormParam("host") String host)
    • setMaintenanceMode

      @POST @Path("maintenance") public javax.ws.rs.core.Response setMaintenanceMode(@FormParam("host") String host, @FormParam("maintenance") boolean maintenance) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getAvailableServicesAsXml

      @GET @Path("available.xml") @Produces("text/xml") public javax.ws.rs.core.Response getAvailableServicesAsXml(@QueryParam("serviceType") String serviceType)
    • getAvailableServicesAsJson

      @GET @Path("available.json") @Produces("application/json") public javax.ws.rs.core.Response getAvailableServicesAsJson(@QueryParam("serviceType") String serviceType)
    • getHealthStatusAsJson

      @GET @Path("health.json") @Produces("application/json") public javax.ws.rs.core.Response getHealthStatusAsJson(@QueryParam("serviceType") String serviceType, @QueryParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getHealthStatus

      @GET @Path("health.xml") @Produces("application/xml") public javax.ws.rs.core.Response getHealthStatus(@QueryParam("serviceType") String serviceType, @QueryParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getRegistrationsAsXml

      @GET @Path("services.xml") @Produces("text/xml") public org.opencastproject.serviceregistry.api.JaxbServiceRegistrationList getRegistrationsAsXml(@QueryParam("serviceType") String serviceType, @QueryParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getRegistrationsAsJson

      @GET @Path("services.json") @Produces("application/json") public org.opencastproject.serviceregistry.api.JaxbServiceRegistrationList getRegistrationsAsJson(@QueryParam("serviceType") String serviceType, @QueryParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getHostsAsXml

      @GET @Path("hosts.xml") @Produces("text/xml") public org.opencastproject.serviceregistry.api.JaxbHostRegistrationList getHostsAsXml() throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getHostsAsJson

      @GET @Path("hosts.json") @Produces("application/json") public org.opencastproject.serviceregistry.api.JaxbHostRegistrationList getHostsAsJson() throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • createJob

      @POST @Path("job") @Produces("text/xml") public javax.ws.rs.core.Response createJob(@Context javax.servlet.http.HttpServletRequest request)
    • updateJob

      @PUT @Path("job/{id}.xml") @Produces("text/xml") public javax.ws.rs.core.Response updateJob(@PathParam("id") String id, @FormParam("job") String jobXml) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getJobAsXml

      @GET @Path("job/{id}.xml") @Produces("text/xml") public org.opencastproject.job.api.JaxbJob getJobAsXml(@PathParam("id") long id) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getJobAsJson

      @GET @Path("job/{id}.json") @Produces("application/json") public org.opencastproject.job.api.JaxbJob getJobAsJson(@PathParam("id") long id) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getChildrenJobsAsXml

      @GET @Path("job/{id}/children.xml") @Produces("text/xml") public org.opencastproject.job.api.JaxbJobList getChildrenJobsAsXml(@PathParam("id") long id)
    • getChildrenJobsAsJson

      @GET @Path("job/{id}/children.json") @Produces("application/json") public org.opencastproject.job.api.JaxbJobList getChildrenJobsAsJson(@PathParam("id") long id)
    • getJobsAsXml

      @GET @Path("jobs.xml") @Produces("text/xml") public org.opencastproject.job.api.JaxbJobList getJobsAsXml(@QueryParam("serviceType") String serviceType, @QueryParam("status") org.opencastproject.job.api.Job.Status status)
    • getActiveJobsAsXml

      @GET @Path("activeJobs.xml") @Produces("text/xml") public org.opencastproject.job.api.JaxbJobList getActiveJobsAsXml()
    • getActiveJobsAsJson

      @GET @Path("activeJobs.json") @Produces("application/json") public org.opencastproject.job.api.JaxbJobList getActiveJobsAsJson()
    • count

      @GET @Path("count") @Produces("text/plain") public long count(@QueryParam("serviceType") String serviceType, @QueryParam("status") org.opencastproject.job.api.Job.Status status, @QueryParam("host") String host, @QueryParam("operation") String operation)
    • getMaximumConcurrentWorkflows

      @GET @Path("maxconcurrentjobs") @Produces("text/plain") @Deprecated public javax.ws.rs.core.Response getMaximumConcurrentWorkflows()
      Deprecated.
    • getMaxLoadOnNode

      @GET @Path("maxload") @Produces("text/xml") public javax.ws.rs.core.Response getMaxLoadOnNode(@QueryParam("host") String host) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • getCurrentLoad

      @GET @Path("currentload") @Produces("text/xml") public javax.ws.rs.core.Response getCurrentLoad()
    • getOwnLoad

      @GET @Path("ownload") @Produces("text/plain") public javax.ws.rs.core.Response getOwnLoad()
    • deleteJob

      @DELETE @Path("job/{id}") public javax.ws.rs.core.Response deleteJob(@PathParam("id") long id) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • removeParentlessJobs

      @POST @Path("removejobs") public javax.ws.rs.core.Response removeParentlessJobs(@FormParam("jobIds") String jobIds) throws org.opencastproject.util.NotFoundException
      Throws:
      org.opencastproject.util.NotFoundException
    • removeParentlessJobs

      @POST @Path("removeparentlessjobs") public javax.ws.rs.core.Response removeParentlessJobs(@FormParam("lifetime") int lifetime)