Class ExecuteServiceRemoteImpl
java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.execute.remote.ExecuteServiceRemoteImpl
- All Implemented Interfaces:
ExecuteService
Remote implementation of the execute service
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencastproject.serviceregistry.api.RemoteBase
RemoteBase.HttpClientClosingInputStream -
Field Summary
Fields inherited from class org.opencastproject.serviceregistry.api.RemoteBase
client, elementsFromHttpResponse, remoteServiceManager, serviceTypeFields inherited from interface org.opencastproject.execute.api.ExecuteService
COLLECTION, ENDPOINT_NAME, EXEC_FORM_PARAM, INPUT_ELEM_FORM_PARAM, INPUT_FILE_PATTERN, INPUT_MP_FORM_PARAM, JOB_TYPE, LOAD_FORM_PARAM, MP_ID_PATTERN, ORG_ID_PATTERN, OUTPUT_FILE_PATTERN, OUTPUT_NAME_FORM_PARAMETER, PARAMS_FORM_PARAM, TYPE_FORM_PARAMETER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(String exec, String params, MediaPackageElement inElement, String outFileName, MediaPackageElement.Type type, float load) Execute the operation specified byexecwith the argument string indicated byargs.execute(String exec, String params, MediaPackage mp, String outFileName, MediaPackageElement.Type type, float load) Execute the operation specified byexecwith the argument string indicated byargs.voidsetRemoteServiceManager(ServiceRegistry serviceRegistry) Sets the remote service manager.voidsetTrustedHttpClient(TrustedHttpClient trustedHttpClient) Sets the trusted http clientMethods inherited from class org.opencastproject.serviceregistry.api.RemoteBase
closeConnection, getResponse, getResponse, runRequest
-
Constructor Details
-
ExecuteServiceRemoteImpl
public ExecuteServiceRemoteImpl()Constructs a new execute service proxy
-
-
Method Details
-
execute
public Job execute(String exec, String params, MediaPackageElement inElement, String outFileName, MediaPackageElement.Type type, float load) throws ExecuteException Description copied from interface:ExecuteServiceExecute the operation specified byexecwith the argument string indicated byargs. This method may create an output file with the nameoutFileNameand aMediaPackageElementwill be created with theMediaPackageElement.Typeindicated by the argumenttype.- Specified by:
executein interfaceExecuteService- Parameters:
exec- The command to be executed by this methodparams- A string containing the argument list for this command. The special argument "#{in}" will be substituted by the location of the resource represented by theinElementparameter, and "#{out}" by the file name indicated inoutFileName.inElement- AnMediaPackageElementobject to be used as an input to the commandoutFileName- The name of the file the command may possibly create.type- TheMediaPackageElement.Typeof theMediaPackageElementcreated by this command.load- A floating point estimate of the load imposed on the node by executing the command- Returns:
- A
Jobrepresenting the execution of the command. After a successful execution, the {link @Job} payload will contain a serialized mediapackage element. - Throws:
ExecuteException- if this method fails to create theJobcorrectly- See Also:
-
execute
public Job execute(String exec, String params, MediaPackage mp, String outFileName, MediaPackageElement.Type type, float load) throws ExecuteException Description copied from interface:ExecuteServiceExecute the operation specified byexecwith the argument string indicated byargs. This method accepts aMediaPackageas an argument, and elements within that MediaPackage may be referenced in the argument list by using certain placeholders.- Specified by:
executein interfaceExecuteService- Parameters:
exec- The command to be executed by this methodparams- A string containing the argument list for this command. Some special placeholders are allowed, that will be converted into the actual locations of elements in the supplied MediaPackagemp- TheMediaPackagecontainingMediaPackageElementsthat will be used as inputs of the commandoutFileName- The name of the file the command may possibly create.type- TheMediaPackageElement.Typeof theMediaPackageElementcreated by this command.load- A floating point estimate of the load imposed on the node by executing the command- Returns:
- A
Jobrepresenting the execution of the command. After a successful execution, the {link @Job} payload will contain a serialized mediapackage element. - Throws:
ExecuteException- if this method fails to create theJobcorrectly- See Also:
-
setTrustedHttpClient
Description copied from class:RemoteBaseSets the trusted http client- Overrides:
setTrustedHttpClientin classRemoteBase- Parameters:
trustedHttpClient-
-
setRemoteServiceManager
Description copied from class:RemoteBaseSets the remote service manager.- Overrides:
setRemoteServiceManagerin classRemoteBase- Parameters:
serviceRegistry-
-