## org.red5.server.statistics
Class StatisticsService

    java.lang.Object
      org.red5.server.statistics.StatisticsService

All Implemented Interfaces:
  IStatisticsService

    public class StatisticsService

extends Object
implements IStatisticsService

Implementation of the statistics service.

Author:
  The Red5 Project (red5@osflash.org), Joachim Bauch (jojo@struktur.de)

Constructor Summary
`StatisticsService()`

Method Summary
`Set<String>` `getScopes()` Return a list of all scopes that currently exist on the server.
`Set<String>` `getScopes(String path)` Return a list of all scopes that currently exist on the server below a current path.
`ISharedObject` `getScopeStatisticsSO(IScope scope)` Return the shared object that will be used to keep scope statistics.
`Set<ISharedObjectStatistics>` `getSharedObjects(String path)` Return informations about shared objects for a given scope.
`ISharedObject` `getSharedObjectStatisticsSO(IScope scope)` Return the shared object that will be used to keep SO statistics.
`void` `setGlobalScope(IScope scope)`
`void` `updateScopeStatistics(String path)` Update statistics for a given scope.
`void` `updateSharedObjectStatistics(String path, String name)` Update informations about a shared object in a given scope.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StatisticsService

    public StatisticsService()

Method Detail

### setGlobalScope

    public void setGlobalScope(IScope scope)

### getScopeStatisticsSO

    public ISharedObject getScopeStatisticsSO(IScope scope)

  Description copied from interface: `IStatisticsService`
  Return the shared object that will be used to keep scope statistics.

  Specified by:
    `getScopeStatisticsSO` in interface `IStatisticsService`
  Parameters:
    `scope` - A scope to return the shared object for.
  Returns:
    the shared object containing scope statistics

### getScopes

    public Set<String> getScopes()

  Description copied from interface: `IStatisticsService`
  Return a list of all scopes that currently exist on the server.

  Specified by:
    `getScopes` in interface `IStatisticsService`
  Returns:
    list of scope names

### getScopes

    public Set<String> getScopes(String path)
                          throws ScopeNotFoundException

  Description copied from interface: `IStatisticsService`
  Return a list of all scopes that currently exist on the server below a current path.

  Specified by:
    `getScopes` in interface `IStatisticsService`
  Parameters:
    `path` - Path to start looking for scopes.
  Returns:
    list of scope names
  Throws:
    `ScopeNotFoundException` - if the path on the server doesn't exist

### getSharedObjectStatisticsSO

    public ISharedObject getSharedObjectStatisticsSO(IScope scope)

  Description copied from interface: `IStatisticsService`
  Return the shared object that will be used to keep SO statistics.

  Specified by:
    `getSharedObjectStatisticsSO` in interface `IStatisticsService`
  Parameters:
    `scope` - A scope to return the shared object for.
  Returns:
    the shared object containing SO statistics

### getSharedObjects

    public Set<ISharedObjectStatistics> getSharedObjects(String path)

  Description copied from interface: `IStatisticsService`
  Return informations about shared objects for a given scope.

  Specified by:
    `getSharedObjects` in interface `IStatisticsService`
  Parameters:
    `path` - Path to scope to return shared object names for.
  Returns:
    list of informations about shared objects

### updateScopeStatistics

    public void updateScopeStatistics(String path)
                               throws ScopeNotFoundException

  Description copied from interface: `IStatisticsService`
  Update statistics for a given scope.

  Specified by:
    `updateScopeStatistics` in interface `IStatisticsService`
  Parameters:
    `path` - Path to scope to update.
  Throws:
    `ScopeNotFoundException` - if the given scope doesn't exist

### updateSharedObjectStatistics

    public void updateSharedObjectStatistics(String path,
                                             String name)
                                      throws ScopeNotFoundException,
                                             SharedObjectException

  Description copied from interface: `IStatisticsService`
  Update informations about a shared object in a given scope.

  Specified by:
    `updateSharedObjectStatistics` in interface `IStatisticsService`
  Parameters:
    `path` - Path to scope that contains the shared object.
    `name` - Name of shared object to update.
  Throws:
    `ScopeNotFoundException` - if the given scope doesn't exist
    `SharedObjectException` - if no shared object with the given name exists

Copyright © 2006-2010 The Red5 Project