Class CaptionServiceRemoteImpl
java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.caption.remote.CaptionServiceRemoteImpl
- All Implemented Interfaces:
CaptionService
Proxies a set of remote composer services for use as a JVM-local service. Remote services are selected at random.
-
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, remoteServiceManager, serviceTypeFields inherited from interface org.opencastproject.caption.api.CaptionService
JOB_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(MediaPackageElement input, String inputFormat, String outputFormat) Converts captions from one format to another.convert(MediaPackageElement input, String inputFormat, String outputFormat, String language) Converts captions from one format to another.String[]getLanguageList(MediaPackageElement input, String format) Returns list of languages available in captions (if such information is stored).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, elementsFromHttpResponse, getResponse, getResponse, runRequest
-
Constructor Details
-
CaptionServiceRemoteImpl
public CaptionServiceRemoteImpl()
-
-
Method Details
-
convert
public Job convert(MediaPackageElement input, String inputFormat, String outputFormat) throws UnsupportedCaptionFormatException, CaptionConverterException, MediaPackageException Description copied from interface:CaptionServiceConverts captions from one format to another. Language parameter is used for those formats that store information about language.- Specified by:
convertin interfaceCaptionService- Parameters:
input- MediaPackageElement containing captionsinputFormat- format of imported captionsoutputFormat- format of exported captions- Throws:
UnsupportedCaptionFormatException- if there is no matching engine registered for given input or outputCaptionConverterException- if exception occurs while convertingMediaPackageException- if the catalog is invalid- See Also:
-
convert
public Job convert(MediaPackageElement input, String inputFormat, String outputFormat, String language) throws UnsupportedCaptionFormatException, CaptionConverterException, MediaPackageException Description copied from interface:CaptionServiceConverts captions from one format to another. Language parameter is used for those formats that store information about language.- Specified by:
convertin interfaceCaptionService- Parameters:
input- MediaPackageElement containing captionsinputFormat- format of imported captionsoutputFormat- format of exported captionslanguage- language of captions- Throws:
UnsupportedCaptionFormatException- if there is no matching engine registered for given input or outputCaptionConverterException- if exception occurs while convertingMediaPackageException- if the catalog is invalid- See Also:
-
getLanguageList
public String[] getLanguageList(MediaPackageElement input, String format) throws UnsupportedCaptionFormatException, CaptionConverterException Description copied from interface:CaptionServiceReturns list of languages available in captions (if such information is stored).- Specified by:
getLanguageListin interfaceCaptionService- Parameters:
input- Catalog containing captionsformat- captions' format- Returns:
- Array of languages available in captions
- Throws:
UnsupportedCaptionFormatException- if there is no matching engine registered for given input or outputCaptionConverterException- if parser encounters exception- 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-
-