Class MediaInspectionRestEndpoint
java.lang.Object
org.opencastproject.rest.AbstractJobProducerEndpoint
org.opencastproject.inspection.ffmpeg.endpoints.MediaInspectionRestEndpoint
A service endpoint to expose the
MediaInspectionService via REST.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MediaInspectionServiceThe inspection serviceprotected ServiceRegistryThe service registry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.protected 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.ResponseenrichTrack(String mediaPackageElement, boolean override, String options) Returns the job producer that is backing this REST endpoint.Return the service registry.javax.ws.rs.core.ResponseinspectTrack(URI uri, String options) voidsetService(MediaInspectionService service) Sets the inspection serviceprotected voidsetServiceRegistry(ServiceRegistry serviceRegistry) Callback from the OSGi declarative services to set the service registry.voidunsetService(MediaInspectionService service) Removes the inspection serviceMethods inherited from class org.opencastproject.rest.AbstractJobProducerEndpoint
checkHeartbeat, dispatchJob
-
Field Details
-
service
The inspection service -
serviceRegistry
The service registry
-
-
Constructor Details
-
MediaInspectionRestEndpoint
public MediaInspectionRestEndpoint()
-
-
Method Details
-
setServiceRegistry
Callback from the OSGi declarative services to set the service registry.- Parameters:
serviceRegistry- the service registry
-
setService
Sets the inspection service- Parameters:
service- the inspection service
-
unsetService
Removes the inspection service- Parameters:
service-
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) Callback from OSGi that is called when this service is activated.- Parameters:
cc- OSGi component context
-
inspectTrack
-
enrichTrack
-
getService
Returns the job producer that is backing this REST endpoint.- Specified by:
getServicein classAbstractJobProducerEndpoint- Returns:
- the job producer
- See Also:
-
getServiceRegistry
Return the service registry.- Specified by:
getServiceRegistryin classAbstractJobProducerEndpoint- 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
-