Class ServiceRegistryEndpoint
java.lang.Object
org.opencastproject.serviceregistry.impl.endpoint.ServiceRegistryEndpoint
Displays hosts and the service IDs they provide.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.longcount(String serviceType, org.opencastproject.job.api.Job.Status status, String host, String operation) javax.ws.rs.core.ResponsecreateJob(javax.servlet.http.HttpServletRequest request) javax.ws.rs.core.ResponsedeleteJob(long id) javax.ws.rs.core.ResponsedisableHost(String host) javax.ws.rs.core.ResponseenableHost(String host) org.opencastproject.job.api.JaxbJobListorg.opencastproject.job.api.JaxbJobListjavax.ws.rs.core.ResponsegetAvailableServicesAsJson(String serviceType) javax.ws.rs.core.ResponsegetAvailableServicesAsXml(String serviceType) org.opencastproject.job.api.JaxbJobListgetChildrenJobsAsJson(long id) org.opencastproject.job.api.JaxbJobListgetChildrenJobsAsXml(long id) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetHealthStatus(String serviceType, String host) javax.ws.rs.core.ResponsegetHealthStatusAsJson(String serviceType, String host) org.opencastproject.serviceregistry.api.JaxbHostRegistrationListorg.opencastproject.serviceregistry.api.JaxbHostRegistrationListorg.opencastproject.job.api.JaxbJobgetJobAsJson(long id) org.opencastproject.job.api.JaxbJobgetJobAsXml(long id) org.opencastproject.job.api.JaxbJobListgetJobsAsXml(String serviceType, org.opencastproject.job.api.Job.Status status) javax.ws.rs.core.ResponseDeprecated.javax.ws.rs.core.ResponsegetMaxLoadOnNode(String host) javax.ws.rs.core.Responseorg.opencastproject.serviceregistry.api.JaxbServiceRegistrationListgetRegistrationsAsJson(String serviceType, String host) org.opencastproject.serviceregistry.api.JaxbServiceRegistrationListgetRegistrationsAsXml(String serviceType, String host) javax.ws.rs.core.Responsejavax.ws.rs.core.Responseorg.opencastproject.serviceregistry.api.JaxbServiceRegistrationvoidjavax.ws.rs.core.ResponseremoveParentlessJobs(int lifetime) javax.ws.rs.core.ResponseremoveParentlessJobs(String jobIds) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsesetMaintenanceMode(String host, boolean maintenance) voidsetSecurityService(org.opencastproject.security.api.SecurityService securityService) voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Sets the service registry instance for delegationjavax.ws.rs.core.Responseunregister(String host) javax.ws.rs.core.Responseunregister(String serviceType, String host) javax.ws.rs.core.Response
-
Field Details
-
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe remote service maanger -
serverUrl
This server's URL -
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
-
unregister
-
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
-
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
-
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)
-