Interface IStatisticsService

  • All Known Implementing Classes:
    StatisticsService

    public interface IStatisticsService
    Statistics methods for Red5. They can be used to poll for updates of given elements inside the server. Statistics data will be stored as properties of different shared objects. Use
     getScopeStatisticsSO
     
    and
     getSharedObjectStatisticsSO
     
    to get these shared objects. The property names are
     scopeName
     
    for scope attributes and
     scopeName | sharedObjectName
     
    for shared object attributes. Each property holds a Map containing key/value mappings of the corresponding attributes. Sometime in the future, the updates on the shared objects will be done automatically so a client doesn't need to poll for them.
    Author:
    The Red5 Project, Joachim Bauch ([email protected])
    • Method Detail

      • getScopeStatisticsSO

        org.red5.server.api.so.ISharedObject getScopeStatisticsSO​(org.red5.server.api.scope.IScope scope)
        Return the shared object that will be used to keep scope statistics.
        Parameters:
        scope - A scope to return the shared object for.
        Returns:
        the shared object containing scope statistics
      • getSharedObjectStatisticsSO

        org.red5.server.api.so.ISharedObject getSharedObjectStatisticsSO​(org.red5.server.api.scope.IScope scope)
        Return the shared object that will be used to keep SO statistics.
        Parameters:
        scope - A scope to return the shared object for.
        Returns:
        the shared object containing SO statistics
      • getScopes

        Set<String> getScopes()
        Return a list of all scopes that currently exist on the server.
        Returns:
        list of scope names
      • getScopes

        Set<String> getScopes​(String path)
                       throws org.red5.server.exception.ScopeNotFoundException
        Return a list of all scopes that currently exist on the server below a current path.
        Parameters:
        path - Path to start looking for scopes.
        Returns:
        list of scope names
        Throws:
        org.red5.server.exception.ScopeNotFoundException - if the path on the server doesn't exist
      • updateScopeStatistics

        void updateScopeStatistics​(String path)
                            throws org.red5.server.exception.ScopeNotFoundException
        Update statistics for a given scope.
        Parameters:
        path - Path to scope to update.
        Throws:
        org.red5.server.exception.ScopeNotFoundException - if the given scope doesn't exist
      • getSharedObjects

        Set<org.red5.server.api.statistics.ISharedObjectStatistics> getSharedObjects​(String path)
        Return informations about shared objects for a given scope.
        Parameters:
        path - Path to scope to return shared object names for.
        Returns:
        list of informations about shared objects
      • updateSharedObjectStatistics

        void updateSharedObjectStatistics​(String path,
                                          String name)
                                   throws org.red5.server.exception.ScopeNotFoundException,
                                          SharedObjectException
        Update informations about a shared object in a given scope.
        Parameters:
        path - Path to scope that contains the shared object.
        name - Name of shared object to update.
        Throws:
        org.red5.server.exception.ScopeNotFoundException - if the given scope doesn't exist
        SharedObjectException - if no shared object with the given name exists