Class ServiceRegistryEndpoint
java.lang.Object
org.opencastproject.serviceregistry.impl.endpoint.ServiceRegistryEndpoint
Displays hosts and the service IDs they provide.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThis server's URLprotected StringThe service path for this endpointprotected ServiceRegistryThe remote service maanger -
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, 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) javax.ws.rs.core.ResponsegetAvailableServicesAsJson(String serviceType) javax.ws.rs.core.ResponsegetAvailableServicesAsXml(String serviceType) getChildrenJobsAsJson(long id) getChildrenJobsAsXml(long id) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsegetHealthStatus(String serviceType, String host) javax.ws.rs.core.ResponsegetHealthStatusAsJson(String serviceType, String host) getJobAsJson(long id) getJobAsXml(long id) getJobsAsXml(String serviceType, Job.Status status) javax.ws.rs.core.ResponseDeprecated.javax.ws.rs.core.ResponsegetMaxLoadOnNode(String host) javax.ws.rs.core.ResponsegetRegistrationsAsJson(String serviceType, String host) getRegistrationsAsXml(String serviceType, String host) javax.ws.rs.core.Responsejavax.ws.rs.core.Responsevoidjavax.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(SecurityService securityService) voidsetServiceRegistry(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
The remote service maanger -
serverUrl
This server's URL -
servicePath
The service path for this endpoint
-
-
Constructor Details
-
ServiceRegistryEndpoint
public ServiceRegistryEndpoint()
-
-
Method Details
-
setServiceRegistry
Sets the service registry instance for delegation -
setSecurityService
-
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 ServiceRegistryException- Throws:
ServiceRegistryException
-
sanitize
@POST @Path("sanitize") public javax.ws.rs.core.Response sanitize(@FormParam("serviceType") String serviceType, @FormParam("host") String host) throws NotFoundException - Throws:
NotFoundException
-
register
@POST @Path("register") @Produces("text/xml") public JaxbServiceRegistration register(@FormParam("serviceType") String serviceType, @FormParam("host") String host, @FormParam("path") String path, @FormParam("jobProducer") boolean jobProducer) -
unregister
-
enableHost
@POST @Path("enablehost") public javax.ws.rs.core.Response enableHost(@FormParam("host") String host) throws NotFoundException - Throws:
NotFoundException
-
disableHost
@POST @Path("disablehost") public javax.ws.rs.core.Response disableHost(@FormParam("host") String host) throws NotFoundException - Throws:
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 NotFoundException - Throws:
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 NotFoundException - Throws:
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 NotFoundException - Throws:
NotFoundException
-
getRegistrationsAsXml
@GET @Path("services.xml") @Produces("text/xml") public JaxbServiceRegistrationList getRegistrationsAsXml(@QueryParam("serviceType") String serviceType, @QueryParam("host") String host) throws NotFoundException - Throws:
NotFoundException
-
getRegistrationsAsJson
@GET @Path("services.json") @Produces("application/json") public JaxbServiceRegistrationList getRegistrationsAsJson(@QueryParam("serviceType") String serviceType, @QueryParam("host") String host) throws NotFoundException - Throws:
NotFoundException
-
getHostsAsXml
@GET @Path("hosts.xml") @Produces("text/xml") public JaxbHostRegistrationList getHostsAsXml() throws NotFoundException- Throws:
NotFoundException
-
getHostsAsJson
@GET @Path("hosts.json") @Produces("application/json") public JaxbHostRegistrationList getHostsAsJson() throws NotFoundException- Throws:
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 NotFoundException - Throws:
NotFoundException
-
getJobAsXml
@GET @Path("job/{id}.xml") @Produces("text/xml") public JaxbJob getJobAsXml(@PathParam("id") long id) throws NotFoundException - Throws:
NotFoundException
-
getJobAsJson
@GET @Path("job/{id}.json") @Produces("application/json") public JaxbJob getJobAsJson(@PathParam("id") long id) throws NotFoundException - Throws:
NotFoundException
-
getChildrenJobsAsXml
@GET @Path("job/{id}/children.xml") @Produces("text/xml") public JaxbJobList getChildrenJobsAsXml(@PathParam("id") long id) -
getChildrenJobsAsJson
@GET @Path("job/{id}/children.json") @Produces("application/json") public JaxbJobList getChildrenJobsAsJson(@PathParam("id") long id) -
getJobsAsXml
@GET @Path("jobs.xml") @Produces("text/xml") public JaxbJobList getJobsAsXml(@QueryParam("serviceType") String serviceType, @QueryParam("status") Job.Status status) -
getActiveJobsAsXml
-
getActiveJobsAsJson
@GET @Path("activeJobs.json") @Produces("application/json") public JaxbJobList getActiveJobsAsJson() -
count
@GET @Path("count") @Produces("text/plain") public long count(@QueryParam("serviceType") String serviceType, @QueryParam("status") 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 NotFoundException - Throws:
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 NotFoundException - Throws:
NotFoundException
-
removeParentlessJobs
@POST @Path("removejobs") public javax.ws.rs.core.Response removeParentlessJobs(@FormParam("jobIds") String jobIds) throws NotFoundException - Throws:
NotFoundException
-
removeParentlessJobs
@POST @Path("removeparentlessjobs") public javax.ws.rs.core.Response removeParentlessJobs(@FormParam("lifetime") int lifetime)
-