Class LibJitsi
- java.lang.Object
-
- org.jitsi.service.libjitsi.LibJitsi
-
- Direct Known Subclasses:
LibJitsiImpl
public abstract class LibJitsi extends Object
Represents the entry point of the libjitsi library.The
start()method is to be called to initialize/start the use of the library. Respectively, thestop()method is to be called to uninitialize/stop the use of the library (i.e. to release the resources acquired by the library during its execution). The getXXXService() methods may be called only after the start() method returns successfully and before the stop() method is called.The libjitsi library may be utilized both with and without OSGi. If the library detects during the execution of the start() method that (a) the LibJitsi class has been loaded as part of an OSGi Bundle and (b) successfully retrieves the associated BundleContext, it will look for the references to the implementations of the supported service classes in the retrieved BundleContext. Otherwise, the library will stand alone without relying on OSGi functionality. In the case of successful detection of OSGi, the library will not register the supported service class instances in the retrieved BundleContext.
- Author:
- Lyubomir Marinov
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLibJitsi()Initializes a new LibJitsi instance.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AudioNotifierServicegetAudioNotifierService()Gets the AudioNotifierService instance.static org.jitsi.service.configuration.ConfigurationServicegetConfigurationService()Gets the ConfigurationService instance.static FileAccessServicegetFileAccessService()Gets the FileAccessService instance.static MediaServicegetMediaService()Gets the MediaService instance.static PacketLoggingServicegetPacketLoggingService()Gets the PacketLoggingService instance.static ResourceManagementServicegetResourceManagementService()Gets the ResourceManagementService instance.protected abstract <T> TgetService(Class<T> serviceClass)Gets a service of a specific type associated with this implementation of the libjitsi library.static voidstart()Starts/initializes the use of the libjitsi library.static voidstop()Stops/uninitializes the use of the libjitsi library.
-
-
-
Method Detail
-
getAudioNotifierService
public static AudioNotifierService getAudioNotifierService()
Gets the AudioNotifierService instance. If no existing AudioNotifierService instance is known to the library, tries to initialize a new one. (Such a try to initialize a new instance is performed just once while the library is initialized.)- Returns:
- the AudioNotifierService instance known to the library or null if no AudioNotifierService instance is known to the library
-
getConfigurationService
public static org.jitsi.service.configuration.ConfigurationService getConfigurationService()
Gets the ConfigurationService instance. If no existing ConfigurationService instance is known to the library, tries to initialize a new one. (Such a try to initialize a new instance is performed just once while the library is initialized.)- Returns:
- the ConfigurationService instance known to the library or null if no ConfigurationService instance is known to the library
-
getFileAccessService
public static FileAccessService getFileAccessService()
Gets the FileAccessService instance. If no existing FileAccessService instance is known to the library, tries to initialize a new one. (Such a try to initialize a new instance is performed just once while the library is initialized.)- Returns:
- the FileAccessService instance known to the library or null if no FileAccessService instance is known to the library
-
getMediaService
public static MediaService getMediaService()
Gets the MediaService instance. If no existing MediaService instance is known to the library, tries to initialize a new one. (Such a try to initialize a new instance is performed just once while the library is initialized.)- Returns:
- the MediaService instance known to the library or null if no MediaService instance is known to the library
-
getPacketLoggingService
public static PacketLoggingService getPacketLoggingService()
Gets the PacketLoggingService instance. If no existing PacketLoggingService instance is known to the library, tries to initialize a new one. (Such a try to initialize a new instance is performed just once while the library is initialized.)- Returns:
- the PacketLoggingService instance known to the library or null if no PacketLoggingService instance is known to the library
-
getResourceManagementService
public static ResourceManagementService getResourceManagementService()
Gets the ResourceManagementService instance. If no existing ResourceManagementService instance is known to the library, tries to initialize a new one. (Such a try to initialize a new instance is performed just once while the library is initialized.)- Returns:
- the ResourceManagementService instance known to the library or null if no ResourceManagementService instance is known to the library
-
start
public static void start()
Starts/initializes the use of the libjitsi library.
-
stop
public static void stop()
Stops/uninitializes the use of the libjitsi library.
-
getService
protected abstract <T> T getService(Class<T> serviceClass)
Gets a service of a specific type associated with this implementation of the libjitsi library.- Parameters:
serviceClass- the type of the service to be retrieved- Returns:
- a service of the specified type if there is such an association known to this implementation of the libjitsi library; otherwise, null
-
-