org.red5.server.jmx.mxbeans

## Interface ScopeMXBean

All Known Subinterfaces:
  GlobalScopeMXBean, WebScopeMXBean

All Known Implementing Classes:
  GlobalScope, RoomScope, Scope, WebScope

    @MXBean
    public interface ScopeMXBean

An MBean interface for the scope object.

Author:
  The Red5 Project (red5@osflash.org), Paul Gregoire (mondain@gmail.com)

### Method Summary

Methods
`boolean` `createChildScope(String name)` Create child scope with given name
`void` `destroy()` Destroys scope
`int` `getActiveClients()` Return current number of clients connected to the scope.
`int` `getActiveConnections()` Return current number of connections to the scope.
`int` `getActiveSubscopes()` Return number of currently existing subscopes.
`String` `getContextPath()` Return scope context path
`int` `getDepth()` return scope depth
`boolean` `getEnabled()` Check if scope is enabled
`int` `getMaxClients()` Return maximum number of clients concurrently connected to the scope.
`int` `getMaxConnections()` Return maximum number of concurrent connections to the scope.
`int` `getMaxSubscopes()` Return maximum number of concurrently existing subscopes.
`String` `getPath()` Return scope path calculated from parent path and parent scope name
`boolean` `getRunning()` Check if scope is in running state
`Set<String>` `getServiceHandlerNames()` Return set of service handler names
`int` `getTotalClients()` Return total number of clients connected to the scope.
`int` `getTotalConnections()` Return total number of connections to the scope.
`int` `getTotalSubscopes()` Return total number of subscopes created.
`boolean` `hasChildScope(ScopeType type, String name)` Check whether scope has child scope with given name and type
`boolean` `hasChildScope(String name)` Check whether scope has child scope with given name
`boolean` `hasContext()` Check if scope has a context
`boolean` `hasHandler()` Check if scope or it's parent has handler
`boolean` `hasParent()` Check if scope has parent scope
`void` `init()` Initialization actions, start if autostart is set to `true`
`void` `setAutoStart(boolean autoStart)` Setter for autostart flag
`void` `setChildLoadPath(String pattern)` Setter for child load path.
`void` `setDepth(int depth)` Set scope depth
`void` `setEnabled(boolean enabled)` Enable or disable scope by setting enable flag
`void` `setName(String name)` Setter for scope name
`void` `setPersistenceClass(String persistenceClass)` Set scope persistence class
`boolean` `start()` Starts scope
`void` `stop()` Stops scope
`void` `unregisterServiceHandler(String name)` Unregisters service handler by name

### Method Detail

#### getEnabled

    boolean getEnabled()

Check if scope is enabled

Returns:
  `true` if scope is enabled, `false` otherwise

#### setEnabled

    void setEnabled(boolean enabled)

Enable or disable scope by setting enable flag

Parameters:
  `enabled` - Enable flag value

#### getRunning

    boolean getRunning()

Check if scope is in running state

Returns:
  `true` if scope is in running state, `false` otherwise

#### setAutoStart

    void setAutoStart(boolean autoStart)

Setter for autostart flag

Parameters:
  `autoStart` - Autostart flag value

#### init

    void init()

Initialization actions, start if autostart is set to `true`

#### start

    boolean start()

Starts scope

Returns:
  `true` if scope has handler and it's start method returned true, `false` otherwise

#### stop

    void stop()

Stops scope

#### destroy

    void destroy()

Destroys scope

#### setPersistenceClass

    void setPersistenceClass(String persistenceClass)
                             throws Exception

Set scope persistence class

Parameters:
  `persistenceClass` - Scope's persistence class
Throws:
  `Exception` - Exception

#### setChildLoadPath

    void setChildLoadPath(String pattern)

Setter for child load path. Should be implemented in subclasses?

Parameters:
  `pattern` - Load path pattern

#### hasChildScope

    boolean hasChildScope(String name)

Check whether scope has child scope with given name

Parameters:
  `name` - Child scope name
Returns:
  `true` if scope has child node with given name, `false` otherwise

#### hasChildScope

    boolean hasChildScope(ScopeType type,
                        String name)

Check whether scope has child scope with given name and type

Parameters:
  `type` - Child scope type
  `name` - Child scope name
Returns:
  `true` if scope has child node with given name and type, `false` otherwise

#### hasContext

    boolean hasContext()

Check if scope has a context

Returns:
  `true` if scope has context, `false` otherwise

#### getContextPath

    String getContextPath()

Return scope context path

Returns:
  Scope context path

#### setName

    void setName(String name)

Setter for scope name

Parameters:
  `name` - Scope name

#### getPath

    String getPath()

Return scope path calculated from parent path and parent scope name

Returns:
  Scope path

#### hasHandler

    boolean hasHandler()

Check if scope or it's parent has handler

Returns:
  `true` if scope or it's parent scope has a handler, `false` otherwise

#### hasParent

    boolean hasParent()

Check if scope has parent scope

Returns:
  `true` if scope has parent scope, `false` otherwise`

#### setDepth

    void setDepth(int depth)

Set scope depth

Parameters:
  `depth` - Scope depth

#### getDepth

    int getDepth()

return scope depth

Returns:
  Scope depth

#### createChildScope

    boolean createChildScope(String name)

Create child scope with given name

Parameters:
  `name` - Child scope name
Returns:
  `true` on success, `false` otherwise

#### unregisterServiceHandler

    void unregisterServiceHandler(String name)

Unregisters service handler by name

Parameters:
  `name` - Service handler name

#### getServiceHandlerNames

    Set<String> getServiceHandlerNames()

Return set of service handler names

Returns:
  Set of service handler names

#### getTotalConnections

    int getTotalConnections()

Return total number of connections to the scope.

Returns:
  number of connections

#### getMaxConnections

    int getMaxConnections()

Return maximum number of concurrent connections to the scope.

Returns:
  number of connections

#### getActiveConnections

    int getActiveConnections()

Return current number of connections to the scope.

Returns:
  number of connections

#### getTotalClients

    int getTotalClients()

Return total number of clients connected to the scope.

Returns:
  number of clients

#### getMaxClients

    int getMaxClients()

Return maximum number of clients concurrently connected to the scope.

Returns:
  number of clients

#### getActiveClients

    int getActiveClients()

Return current number of clients connected to the scope.

Returns:
  number of clients

#### getTotalSubscopes

    int getTotalSubscopes()

Return total number of subscopes created.

Returns:
  number of subscopes created

#### getMaxSubscopes

    int getMaxSubscopes()

Return maximum number of concurrently existing subscopes.

Returns:
  number of subscopes

#### getActiveSubscopes

    int getActiveSubscopes()

Return number of currently existing subscopes.

Returns:
  number of subscopes