Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.red5.server
Interface ScopeMBean

All Known Implementing Classes:
  GlobalScope, Scope, WebScope

    public interface ScopeMBean

An MBean interface for the scope object.

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

Method Summary
`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.
`IBasicScope` | `getBasicScope(String type, String name)` Return base scope of given type with given name
`Iterator<String>` | `getBasicScopeNames(String type)` Return basic scope names iterator
`Set<IClient>` | `getClients()` Return set of clients
`Collection<Set<IConnection>>` | `getConnections()` Return connection iterator
`IContext` | `getContext()` Return scope context.
`String` | `getContextPath()` Return scope context path
`int` | `getDepth()` return scope depth
`boolean` | `getEnabled()` Check if scope is enabled
`IScopeHandler` | `getHandler()` Return scope handler or parent's scope handler if this scope doesn't have one
`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.
`IScope` | `getParent()` Return parent scope
`String` | `getPath()` Return scope path calculated from parent path and parent scope name
`Resource` | `getResource(String path)` Return resource located at given path
`Resource[]` | `getResources(String path)` Return array of resources from path string, usually used with pattern path
`boolean` | `getRunning()` Check if scope is in running state
`IScope` | `getScope(String name)` Return child scope by name
`Iterator<String>` | `getScopeNames()` Return child scope names iterator
`Object` | `getServiceHandler(String name)` Return service handler by name
`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(String name)` Check whether scope has child scope with given name
`boolean` | `hasChildScope(String type, String name)` Check whether scope has child scope with given name and type
`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` | `registerServiceHandler(String name, Object handler)` Register service handler by name
`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(String 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

### getScopeNames

    Iterator<String> getScopeNames()

  Return child scope names iterator

  Returns:
    Child scope names iterator

### getClients

    Set<IClient> getClients()

  Return set of clients

  Returns:
    Set of clients bound to scope

### hasContext

    boolean hasContext()

  Check if scope has a context

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

### getContext

    IContext getContext()

  Return scope context. If scope doesn't have context, parent's context is returns, and so forth.

  Returns:
    Scope context or parent context

### 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

### getHandler

    IScopeHandler getHandler()

  Return scope handler or parent's scope handler if this scope doesn't have one

  Returns:
    Scope handler (or parent's one)

### getParent

    IScope getParent()

  Return parent scope

  Returns:
    Parent scope

### 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

### getResources

    Resource[] getResources(String path)
                            throws IOException

  Return array of resources from path string, usually used with pattern path

  Parameters:
    `path` - Resources path
  Returns:
    Resources
  Throws:
    `IOException` - I/O exception

### getResource

    Resource getResource(String path)

  Return resource located at given path

  Parameters:
    `path` - Resource path
  Returns:
    Resource

### getConnections

    Collection<Set<IConnection>> getConnections()

  Return connection iterator

  Returns:
    Connections iterator

### createChildScope

    boolean createChildScope(String name)

  Create child scope with given name

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

### getBasicScope

    IBasicScope getBasicScope(String type,
                              String name)

  Return base scope of given type with given name

  Parameters:
    `type` - Scope type
    `name` - Scope name
  Returns:
    Basic scope object

### getBasicScopeNames

    Iterator<String> getBasicScopeNames(String type)

  Return basic scope names iterator

  Parameters:
    `type` - Scope type
  Returns:
    Iterator

### getScope

    IScope getScope(String name)

  Return child scope by name

  Parameters:
    `name` - Scope name
  Returns:
    Child scope with given name

### registerServiceHandler

    void registerServiceHandler(String name,
                                Object handler)

  Register service handler by name

  Parameters:
    `name` - Service handler name
    `handler` - Service handler

### unregisterServiceHandler

    void unregisterServiceHandler(String name)

  Unregisters service handler by name

  Parameters:
    `name` - Service handler name

### getServiceHandler

    Object getServiceHandler(String name)

  Return service handler by name

  Parameters:
    `name` - Handler name
  Returns:
    Service handler with given 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2010 The Red5 Project