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

    Fields
    Modifier and Type
    Field
    Description
    protected org.opencastproject.execute.api.ExecuteService
    The execute service
    protected org.opencastproject.serviceregistry.api.ServiceRegistry
    The service registry
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    checkNotNull(Object... services)
    Checks if the service or services are available, if not it handles it by returning a 503 with a message
    javax.ws.rs.core.Response
    execute(String exec, String params, Float loadParam, String inputElementStr, String inputMpStr, String outputFileName, String elementTypeStr)
     
    org.opencastproject.job.api.JobProducer
    org.opencastproject.serviceregistry.api.ServiceRegistry
    void
    setExecuteService(org.opencastproject.execute.api.ExecuteService service)
    Sets the service
    protected void
    setServiceRegistry(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serviceRegistry

      protected org.opencastproject.serviceregistry.api.ServiceRegistry serviceRegistry
      The service registry
    • service

      protected org.opencastproject.execute.api.ExecuteService service
      The 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:
      getService in class org.opencastproject.rest.AbstractJobProducerEndpoint
      See Also:
      • AbstractJobProducerEndpoint.getService()
    • checkNotNull

      protected void checkNotNull(Object... services)
      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:
      getServiceRegistry in class org.opencastproject.rest.AbstractJobProducerEndpoint
      See Also:
      • AbstractJobProducerEndpoint.getServiceRegistry()