com.tenduke.services.multimedia
Class Multimedia

java.lang.Object
  extended by com.tenduke.services.multimedia.Multimedia
All Implemented Interfaces:
Service

public class Multimedia
extends java.lang.Object
implements Service

Service implementation, which is responsible for loading configuration and initializing a MediaProcessingProvider for video and audio media processing.


Field Summary
static java.lang.String SERVICE_NAME
          Constant for informal name of this service.
 
Fields inherited from interface com.tenduke.services.Service
SERVICE_ERROR_ON_STOP, SERVICE_FAILED_TO_START, SERVICE_OK
 
Constructor Summary
Multimedia()
          Creates a new instance of Multimedia.
 
Method Summary
 java.lang.String getServiceName()
          Gets informal name of this service.
 boolean isOn()
          Gets service state: true or false indicating if service has been started successfully.
 int startService()
           Starts Multimedia service.
 int stopService()
          Stops Multimedia service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Constant for informal name of this service.

See Also:
Constant Field Values
Constructor Detail

Multimedia

public Multimedia()
Creates a new instance of Multimedia. If a configuration key media.mediaprocessingprovider.classname does not exist, sets it's value to com.tenduke.multimedia.MediaProcessingToolchain.

Method Detail

getServiceName

public java.lang.String getServiceName()
Gets informal name of this service.

Specified by:
getServiceName in interface Service
Returns:
informal name of this service.

isOn

public boolean isOn()
Gets service state: true or false indicating if service has been started successfully.

Specified by:
isOn in interface Service
Returns:
true or false indicating if service has been started successfully.

startService

public int startService()

Starts Multimedia service. Service start registers MediaProcessingToolchain.CONCURRENT_EXECUTION_CALLER_NAME as a thread pool in ExecutionManagers.

Specified by:
startService in interface Service
Returns:
Service.SERVICE_OK if MediaProcessingToolchain.CONCURRENT_EXECUTION_CALLER_NAME thread pool registration in ExecutionManagers was successful.

stopService

public int stopService()
Stops Multimedia service.

Specified by:
stopService in interface Service
Returns:
Service.SERVICE_OK always.