Class ExecuteRestEndpoint
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.execute.impl.endpoint.ExecuteRestEndpoint
@Path("/execute")
public class ExecuteRestEndpoint
extends org.opencastproject.rest.AbstractJobProducerEndpoint
The REST endpoint for
ExecuteServices-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.opencastproject.execute.api.ExecuteServiceThe execute serviceprotected org.opencastproject.serviceregistry.api.ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckNotNull(Object... services) Checks if the service or services are available, if not it handles it by returning a 503 with a messagejavax.ws.rs.core.Responseexecute(String exec, String params, Float loadParam, String inputElementStr, String inputMpStr, String outputFileName, String elementTypeStr) org.opencastproject.job.api.JobProducerorg.opencastproject.serviceregistry.api.ServiceRegistryvoidsetExecuteService(org.opencastproject.execute.api.ExecuteService service) Sets the serviceprotected voidsetServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.Methods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
serviceRegistry
protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistryThe service registry -
service
protected org.opencastproject.execute.api.ExecuteService serviceThe execute service
-
-
Constructor Details
-
ExecuteRestEndpoint
public ExecuteRestEndpoint()
-
-
Method Details
-
execute
@POST @Produces("text/xml") @Path("execute") public javax.ws.rs.core.Response execute(@FormParam("exec") String exec, @FormParam("params") String params, @FormParam("load") Float loadParam, @FormParam("inputElement") String inputElementStr, @FormParam("inputMediaPackage") String inputMpStr, @FormParam("outputFilename") String outputFileName, @FormParam("expectedType") String elementTypeStr) -
setExecuteService
public void setExecuteService(org.opencastproject.execute.api.ExecuteService service) Sets the service- Parameters:
service-
-
getService
public org.opencastproject.job.api.JobProducer getService()- Specified by:
getServicein classorg.opencastproject.rest.AbstractJobProducerEndpoint- See Also:
-
checkNotNull
Checks if the service or services are available, if not it handles it by returning a 503 with a message- Parameters:
services- an array of services to check
-
setServiceRegistry
protected void setServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
getServiceRegistry
public org.opencastproject.serviceregistry.api.ServiceRegistry getServiceRegistry()- Specified by:
getServiceRegistryin classorg.opencastproject.rest.AbstractJobProducerEndpoint- See Also:
-