Class MediaInspectionServiceRemoteImpl
java.lang.Object
org.opencastproject.serviceregistry.api.RemoteBase
org.opencastproject.inspection.remote.MediaInspectionServiceRemoteImpl
- All Implemented Interfaces:
MediaInspectionService
Proxies a remote media inspection service for use as a JVM-local 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.inspection.api.MediaInspectionService
JOB_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new remote media inspection service proxy -
Method Summary
Modifier and TypeMethodDescriptionenrich(MediaPackageElement original, boolean override) Equip an existing media package element with automatically generated metadataenrich(MediaPackageElement original, boolean override, Map<String, String> options) Equip an existing media package element with automatically generated metadataInspect a track based on a given uri to the track and put the gathered data into the trackInspect a track based on a given uri to the track and put the gathered data into the trackvoidsetRemoteServiceManager(ServiceRegistry remoteServiceManager) Sets the remote service manager.voidSets the trusted http clientMethods inherited from class org.opencastproject.serviceregistry.api.RemoteBase
closeConnection, getResponse, getResponse, runRequest
-
Constructor Details
-
MediaInspectionServiceRemoteImpl
public MediaInspectionServiceRemoteImpl()Constructs a new remote media inspection service proxy
-
-
Method Details
-
setTrustedHttpClient
Sets the trusted http client- Overrides:
setTrustedHttpClientin classRemoteBase- Parameters:
client-
-
setRemoteServiceManager
Sets the remote service manager.- Overrides:
setRemoteServiceManagerin classRemoteBase- Parameters:
remoteServiceManager-
-
inspect
Inspect a track based on a given uri to the track and put the gathered data into the track- Specified by:
inspectin interfaceMediaInspectionService- Parameters:
uri- the uri to a track in a media package- Returns:
- the receipt of this job, that can be used to check the current status of inspect method and retrieve track with added metadata when done
- Throws:
MediaInspectionException- if there is a failure during media package update- See Also:
-
inspect
Inspect a track based on a given uri to the track and put the gathered data into the track- Specified by:
inspectin interfaceMediaInspectionService- Parameters:
uri- the uri to a track in a media packageoptions- Options in form of key/value pairs that are passed to the Media Inspection Service implementation. Those options may be implementation specific. The implementation is supposed to raise an exception in case unsupported options are encountered. Value may not be null.- Returns:
- the receipt of this job, that can be used to check the current status of inspect method and retrieve track with added metadata when done
- Throws:
MediaInspectionException- if there is a failure during media package update- See Also:
-
enrich
Equip an existing media package element with automatically generated metadata- Specified by:
enrichin interfaceMediaInspectionService- Parameters:
original- The original media package element that will be inspectedoverride- In case of conflict between existing and automatically obtained metadata this switch selects preference. False..The original metadata will be kept, True..The new metadata will be used.- Returns:
- the receipt of this job, that can be used to check the current status of enrich method and retrieve enriched element when done
- Throws:
MediaInspectionException- if there is a failure during media package update
-
enrich
public Job enrich(MediaPackageElement original, boolean override, Map<String, String> options) throws MediaInspectionExceptionEquip an existing media package element with automatically generated metadata- Specified by:
enrichin interfaceMediaInspectionService- Parameters:
original- The original media package element that will be inspectedoverride- In case of conflict between existing and automatically obtained metadata this switch selects preference. False..The original metadata will be kept, True..The new metadata will be used.options- Options in form of key/value pairs that are passed to the MediaInspectionService implementation. Those options may be implementation specific. The implementation is supposed to raise an exception in case unsupported options are encountered. Value may not be null.- Returns:
- the receipt of this job, that can be used to check the current status of enrich method and retrieve enriched element when done
- Throws:
MediaInspectionException- if there is a failure during media package update
-