org.red5.server.scope

## Class GlobalScope

- java.lang.Object
- - org.red5.server.scope.BasicScope
  - - org.red5.server.scope.Scope
    - - org.red5.server.scope.GlobalScope

All Implemented Interfaces:
  IEventDispatcher, IEventHandler, IEventListener, IEventObservable, ICoreObject, IBasicScope, IGlobalScope, IScope, IServiceHandlerProvider, IScopeStatistics, IStatisticsBase, GlobalScopeMXBean, ScopeMXBean, org.springframework.core.io.ResourceLoader, org.springframework.core.io.support.ResourcePatternResolver

    @ManagedResource
    public class GlobalScope
    extends Scope
    implements IGlobalScope, GlobalScopeMXBean

Global scope is a top level scope. Server instance is meant to be injected with Spring before initialization (otherwise NullPointerException is thrown).

See Also:
  `IGlobalScope`, `IScope`, `Scope`

### Nested Class Summary

### Nested classes/interfaces inherited from class org.red5.server.scope.Scope

`Scope.Builder`

### Field Summary

Fields
`protected IServer` `server`

### Fields inherited from class org.red5.server.scope.Scope

`attributes, clientStats, connectionStats, lock, log, oName, subscopeStats`

### Fields inherited from class org.red5.server.scope.BasicScope

`keepDelay, keepOnDisconnect, listeners, name, parent, persistenceClass, persistent, store, type`

### Fields inherited from interface org.red5.server.api.scope.IScope

`SEPARATOR`

### Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver

`CLASSPATH_ALL_URL_PREFIX`

### Fields inherited from interface org.springframework.core.io.ResourceLoader

`CLASSPATH_URL_PREFIX`

### Constructor Summary

Constructors
Constructor and Description
`GlobalScope()`

### Method Summary

Methods
`IServer` `getServer()` Return the server instance connected to this scope.
`IPersistenceStore` `getStore()` Get persistence store for scope
`void` `register()` Register global scope in server instance, then call initialization
`void` `setPersistenceClass(String persistenceClass)` Set scope persistence class
`void` `setServer(IServer server)` Setter for server

### Methods inherited from class org.red5.server.scope.Scope

`addChildScope, connect, connect, createChildScope, destroy, disconnect, dispatchEvent, dump, from, getActiveClients, getActiveConnections, getActiveSubscopes, getAttribute, getAttributeNames, getAttributes, getBasicScope, getBasicScopeNames, getBroadcastScope, getClassLoader, getClients, getConnections, getContext, getContextPath, getCreationTime, getDepth, getEnabled, getHandler, getMaxClients, getMaxConnections, getMaxSubscopes, getParent, getPath, getResource, getResources, getRunning, getScope, getScopeNames, getServiceHandler, getServiceHandlerNames, getServiceHandlers, getServiceHandlers, getStatistics, getTotalClients, getTotalConnections, getTotalSubscopes, handleEvent, hasAttribute, hasChildScope, hasChildScope, hasContext, hasHandler, hasParent, init, isEnabled, isRunning, lookupConnections, registerJMX, registerServiceHandler, removeAttribute, removeChildren, removeChildScope, setAttribute, setAutoStart, setChildLoadPath, setContext, setDepth, setEnabled, setHandler, setName, setParent, start, stop, toString, uninit, unregisterJMX, unregisterServiceHandler`

### Methods inherited from class org.red5.server.scope.BasicScope

`addEventListener, equals, getEventListeners, getName, getType, hasEventListeners, hashCode, isValid, notifyEvent, removeEventListener, setKeepDelay`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.red5.server.api.scope.IScope

`addChildScope, connect, connect, createChildScope, disconnect, getAttribute, getAttributeNames, getAttributes, getBasicScope, getBasicScopeNames, getBroadcastScope, getClients, getConnections, getContext, getContextPath, getHandler, getScope, getScopeNames, getStatistics, hasAttribute, hasChildScope, hasChildScope, hasHandler, lookupConnections, removeAttribute, removeChildren, removeChildScope, setAttribute`

### Methods inherited from interface org.red5.server.api.scope.IBasicScope

`getDepth, getName, getParent, getPath, getType, hasParent, isValid, setKeepDelay`

### Methods inherited from interface org.red5.server.api.event.IEventDispatcher

`dispatchEvent`

### Methods inherited from interface org.red5.server.api.event.IEventHandler

`handleEvent`

### Methods inherited from interface org.red5.server.api.event.IEventListener

`notifyEvent`

### Methods inherited from interface org.red5.server.api.event.IEventObservable

`addEventListener, getEventListeners, removeEventListener`

### Methods inherited from interface org.springframework.core.io.support.ResourcePatternResolver

`getResources`

### Methods inherited from interface org.springframework.core.io.ResourceLoader

`getClassLoader, getResource`

### Methods inherited from interface org.red5.server.api.service.IServiceHandlerProvider

`getServiceHandler, getServiceHandlerNames, registerServiceHandler, unregisterServiceHandler`

### Methods inherited from interface org.red5.server.jmx.mxbeans.ScopeMXBean

`createChildScope, destroy, getActiveClients, getActiveConnections, getActiveSubscopes, getContextPath, getDepth, getEnabled, getMaxClients, getMaxConnections, getMaxSubscopes, getPath, getRunning, getServiceHandlerNames, getTotalClients, getTotalConnections, getTotalSubscopes, hasChildScope, hasChildScope, hasContext, hasHandler, hasParent, init, setAutoStart, setChildLoadPath, setDepth, setEnabled, setName, start, stop, unregisterServiceHandler`

### Methods inherited from interface org.red5.server.api.statistics.IScopeStatistics

`getName`

### Field Detail

#### server

    protected IServer server

### Constructor Detail

#### GlobalScope

    public GlobalScope()

### Method Detail

#### setPersistenceClass

    public void setPersistenceClass(String persistenceClass)
                             throws Exception

Description copied from class: `Scope`
Set scope persistence class

Specified by:
  `setPersistenceClass` in interface `ScopeMXBean`
Overrides:
  `setPersistenceClass` in class `Scope`
Parameters:
  `persistenceClass` - Persistent class name
Throws:
  `Exception` - Exception

#### getStore

    public IPersistenceStore getStore()

Get persistence store for scope

Specified by:
  `getStore` in interface `IBasicScope`
Overrides:
  `getStore` in class `BasicScope`
Returns:
  Persistence store

#### setServer

    public void setServer(IServer server)

Setter for server

Parameters:
  `server` - Server

#### getServer

    public IServer getServer()

Return the server instance connected to this scope.

Specified by:
  `getServer` in interface `IGlobalScope`
Overrides:
  `getServer` in class `Scope`
Returns:
  the server instance

#### register

    public void register()

Register global scope in server instance, then call initialization

Specified by:
  `register` in interface `IGlobalScope`
Specified by:
  `register` in interface `GlobalScopeMXBean`