Interface ServerManager

All Superinterfaces:
KurentoObject, MediaObject

public interface ServerManager extends MediaObject
This is a standalone object for managing the MediaServer
  • Method Details

    • getInfo

      ServerInfo getInfo()
      Get Server information, version, modules, factories, etc
    • getInfo

      void getInfo(Continuation<ServerInfo> cont)
      Get Server information, version, modules, factories, etc
    • getInfo

      Get Server information, version, modules, factories, etc
    • getPipelines

      List<MediaPipeline> getPipelines()
      Get All the pipelines available in the server
    • getPipelines

      void getPipelines(Continuation<List<MediaPipeline>> cont)
      Get All the pipelines available in the server
    • getPipelines

      TFuture<List<MediaPipeline>> getPipelines(Transaction tx)
      Get All the pipelines available in the server
    • getSessions

      List<String> getSessions()
      Get All active sessions in the server
    • getSessions

      void getSessions(Continuation<List<String>> cont)
      Get All active sessions in the server
    • getSessions

      TFuture<List<String>> getSessions(Transaction tx)
      Get All active sessions in the server
    • getMetadata

      String getMetadata()
      Get Metadata stored in the server
    • getMetadata

      void getMetadata(Continuation<String> cont)
      Get Metadata stored in the server
    • getMetadata

      TFuture<String> getMetadata(Transaction tx)
      Get Metadata stored in the server
    • getKmd

      String getKmd(String moduleName)
      Returns the kmd associated to a module
      Parameters:
      moduleName - Name of the module to get its kmd file
      Returns:
      The kmd file. *
    • getKmd

      void getKmd(String moduleName, Continuation<String> cont)
      Asynchronous version of getKmd: Continuation.onSuccess(F) is called when the action is done. If an error occurs, Continuation.onError(java.lang.Throwable) is called.
      Parameters:
      moduleName - Name of the module to get its kmd file
      See Also:
    • getKmd

      TFuture<String> getKmd(Transaction tx, String moduleName)
      Returns the kmd associated to a module
      Parameters:
      moduleName - Name of the module to get its kmd file
      Returns:
      The kmd file. *
    • getCpuCount

      int getCpuCount()
      Number of CPU cores that the media server can use.

      Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where it is running.

      For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.

      Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.

      Returns:
      Number of CPU cores available for the media server. *
    • getCpuCount

      void getCpuCount(Continuation<Integer> cont)
      Asynchronous version of getCpuCount: Continuation.onSuccess(F) is called when the action is done. If an error occurs, Continuation.onError(java.lang.Throwable) is called.
      See Also:
    • getCpuCount

      TFuture<Integer> getCpuCount(Transaction tx)
      Number of CPU cores that the media server can use.

      Linux processes can be configured to use only a subset of the cores that are available in the system, via the process affinity settings (sched_setaffinity(2)). With this method it is possible to know the number of cores that the media server can use in the machine where it is running.

      For example, it's possible to limit the core affinity inside a Docker container by running with a command such as docker run --cpuset-cpus='0,1'.

      Note that the return value represents the number of logical processing units available, i.e. CPU cores including Hyper-Threading.

      Returns:
      Number of CPU cores available for the media server. *
    • getUsedCpu

      float getUsedCpu(int interval)
      Average CPU usage of the server.

      This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.

      The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).

      Parameters:
      interval - Time to measure the average CPU usage, in milliseconds.
      Returns:
      CPU usage %. *
    • getUsedCpu

      void getUsedCpu(int interval, Continuation<Float> cont)
      Asynchronous version of getUsedCpu: Continuation.onSuccess(F) is called when the action is done. If an error occurs, Continuation.onError(java.lang.Throwable) is called.
      Parameters:
      interval - Time to measure the average CPU usage, in milliseconds.
      See Also:
    • getUsedCpu

      TFuture<Float> getUsedCpu(Transaction tx, int interval)
      Average CPU usage of the server.

      This method measures the average CPU usage of the media server during the requested interval. Normally you will want to choose an interval between 1000 and 10000 ms.

      The returned value represents the global system CPU usage of the media server, as an average across all processing units (CPU cores).

      Parameters:
      interval - Time to measure the average CPU usage, in milliseconds.
      Returns:
      CPU usage %. *
    • getUsedMemory

      long getUsedMemory()
      Returns the amount of memory that the server is using, in KiB
      Returns:
      Used memory, in KiB. *
    • getUsedMemory

      void getUsedMemory(Continuation<Long> cont)
      Asynchronous version of getUsedMemory: Continuation.onSuccess(F) is called when the action is done. If an error occurs, Continuation.onError(java.lang.Throwable) is called.
      See Also:
    • getUsedMemory

      TFuture<Long> getUsedMemory(Transaction tx)
      Returns the amount of memory that the server is using, in KiB
      Returns:
      Used memory, in KiB. *
    • addObjectCreatedListener

      ListenerSubscription addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener)
      Add a EventListener for event ObjectCreatedEvent. Synchronous call.
      Parameters:
      listener - Listener to be called on ObjectCreatedEvent
      Returns:
      ListenerSubscription for the given Listener
    • addObjectCreatedListener

      void addObjectCreatedListener(EventListener<ObjectCreatedEvent> listener, Continuation<ListenerSubscription> cont)
      Add a EventListener for event ObjectCreatedEvent. Asynchronous call. Calls Continuation<ListenerSubscription> when it has been added.
      Parameters:
      listener - Listener to be called on ObjectCreatedEvent
      cont - Continuation to be called when the listener is registered
    • removeObjectCreatedListener

      void removeObjectCreatedListener(ListenerSubscription listenerSubscription)
      Remove a ListenerSubscription for event ObjectCreatedEvent. Synchronous call.
      Parameters:
      listenerSubscription - Listener subscription to be removed
    • removeObjectCreatedListener

      void removeObjectCreatedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
      Remove a ListenerSubscription for event ObjectCreatedEvent. Asynchronous call. Calls Continuation<Void> when it has been removed.
      Parameters:
      listenerSubscription - Listener subscription to be removed
      cont - Continuation to be called when the listener is removed
    • addObjectDestroyedListener

      ListenerSubscription addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener)
      Add a EventListener for event ObjectDestroyedEvent. Synchronous call.
      Parameters:
      listener - Listener to be called on ObjectDestroyedEvent
      Returns:
      ListenerSubscription for the given Listener
    • addObjectDestroyedListener

      void addObjectDestroyedListener(EventListener<ObjectDestroyedEvent> listener, Continuation<ListenerSubscription> cont)
      Add a EventListener for event ObjectDestroyedEvent. Asynchronous call. Calls Continuation<ListenerSubscription> when it has been added.
      Parameters:
      listener - Listener to be called on ObjectDestroyedEvent
      cont - Continuation to be called when the listener is registered
    • removeObjectDestroyedListener

      void removeObjectDestroyedListener(ListenerSubscription listenerSubscription)
      Remove a ListenerSubscription for event ObjectDestroyedEvent. Synchronous call.
      Parameters:
      listenerSubscription - Listener subscription to be removed
    • removeObjectDestroyedListener

      void removeObjectDestroyedListener(ListenerSubscription listenerSubscription, Continuation<Void> cont)
      Remove a ListenerSubscription for event ObjectDestroyedEvent. Asynchronous call. Calls Continuation<Void> when it has been removed.
      Parameters:
      listenerSubscription - Listener subscription to be removed
      cont - Continuation to be called when the listener is removed