Class CaptureAgentStateRestService
java.lang.Object
org.opencastproject.capture.admin.endpoint.CaptureAgentStateRestService
The REST endpoint for the capture agent service on the capture device
-
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.javax.ws.rs.core.ResponsegetAgentState(String agentName, String format) javax.ws.rs.core.ResponsegetCapabilities(String agentName, String type) javax.ws.rs.core.ResponsegetConfiguration(String agentName, String type) javax.ws.rs.core.ResponsegetKnownAgents(String type) javax.ws.rs.core.ResponsegetRecordingState(String id, String type) javax.ws.rs.core.ResponseremoveAgent(String agentName) javax.ws.rs.core.Responsejavax.ws.rs.core.ResponsesetAgentState(javax.servlet.http.HttpServletRequest request, String address, String agentName, String state) javax.ws.rs.core.ResponsesetConfiguration(String agentName, String configuration) javax.ws.rs.core.ResponsesetRecordingState(String id, String state) voidsetSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService) voidsetService(org.opencastproject.capture.admin.api.CaptureAgentStateService service) voidunsetService(org.opencastproject.capture.admin.api.CaptureAgentStateService service)
-
Constructor Details
-
CaptureAgentStateRestService
public CaptureAgentStateRestService()
-
-
Method Details
-
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
-
setService
public void setService(org.opencastproject.capture.admin.api.CaptureAgentStateService service) -
unsetService
public void unsetService(org.opencastproject.capture.admin.api.CaptureAgentStateService service) -
setSchedulerService
public void setSchedulerService(org.opencastproject.scheduler.api.SchedulerService schedulerService) -
getAgentState
@GET @Produces({"application/xml","application/json"}) @Path("agents/{name}.{format:xml|json}") public javax.ws.rs.core.Response getAgentState(@PathParam("name") String agentName, @PathParam("format") String format) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
setAgentState
@POST @Produces("text/html") @Path("agents/{name}") public javax.ws.rs.core.Response setAgentState(@Context javax.servlet.http.HttpServletRequest request, @FormParam("address") String address, @PathParam("name") String agentName, @FormParam("state") String state) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
removeAgent
@DELETE @Path("agents/{name}") @Produces("text/html") public javax.ws.rs.core.Response removeAgent(@PathParam("name") String agentName) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
getKnownAgents
@GET @Produces({"text/xml","application/json"}) @Path("agents.{type:xml|json}") public javax.ws.rs.core.Response getKnownAgents(@PathParam("type") String type) -
getCapabilities
@GET @Produces({"text/xml","application/json"}) @Path("agents/{name}/capabilities.{type:xml|json}") public javax.ws.rs.core.Response getCapabilities(@PathParam("name") String agentName, @PathParam("type") String type) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
getConfiguration
@GET @Produces({"text/xml","application/json"}) @Path("agents/{name}/configuration.{type:xml|json}") public javax.ws.rs.core.Response getConfiguration(@PathParam("name") String agentName, @PathParam("type") String type) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
setConfiguration
-
getRecordingState
@GET @Produces({"text/xml","application/json"}) @Path("recordings/{id}.{type:xml|json|}") public javax.ws.rs.core.Response getRecordingState(@PathParam("id") String id, @PathParam("type") String type) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
setRecordingState
@POST @Path("recordings/{id}") public javax.ws.rs.core.Response setRecordingState(@PathParam("id") String id, @FormParam("state") String state) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
removeRecording
@DELETE @Path("recordings/{id}") public javax.ws.rs.core.Response removeRecording(@PathParam("id") String id) throws org.opencastproject.util.NotFoundException - Throws:
org.opencastproject.util.NotFoundException
-
getAllRecordings
-