org.red5.server.api

## Interface IServer

All Known Implementing Classes:
  Server

    public interface IServer

The interface that represents the Red5 server.

Author:
  The Red5 Project (red5@osflash.org), Luke Hubbard (luke@codegent.com)

### Field Summary

Fields
`static String` `ID` Server ID

### Method Summary

Methods
`void` `addListener(IConnectionListener listener)` Add listener to get notified about connection events.
`void` `addListener(IScopeListener listener)` Add listener to get notified about scope events.
`boolean` `addMapping(String hostName, String contextPath, String globalName)` Map a virtual hostname and a path to the name of a global scope.
`IGlobalScope` `getGlobal(String name)` Get the global scope with given name.
`Iterator<String>` `getGlobalNames()` Get list of global scope names.
`Iterator<IGlobalScope>` `getGlobalScopes()` Get list of global scopes.
`Map<String,String>` `getMappingTable()` Query informations about the global scope mappings.
`IGlobalScope` `lookupGlobal(String hostName, String contextPath)` Lookup the global scope for a host.
`void` `registerGlobal(IGlobalScope scope)` Register a global scope.
`void` `removeListener(IConnectionListener listener)` Remove listener that got notified about connection events.
`void` `removeListener(IScopeListener listener)` Remove listener that got notified about scope events.
`boolean` `removeMapping(String hostName, String contextPath)` Unregister a previously mapped global scope.

### Field Detail

#### ID

    static final String ID

Server ID

See Also:
  Constant Field Values

### Method Detail

#### getGlobal

    IGlobalScope getGlobal(String name)

Get the global scope with given name.

Parameters:
  `name` - Name of the global scope
Returns:
  the global scope

#### registerGlobal

    void registerGlobal(IGlobalScope scope)

Register a global scope.

Parameters:
  `scope` - The global scope to register

#### lookupGlobal

    IGlobalScope lookupGlobal(String hostName,
                            String contextPath)

Lookup the global scope for a host.

Parameters:
  `hostName` - The name of the host
  `contextPath` - The path in the host
Returns:
  The found global scope or `null`

#### addMapping

    boolean addMapping(String hostName,
                     String contextPath,
                     String globalName)

Map a virtual hostname and a path to the name of a global scope.

Parameters:
  `hostName` - The name of the host to map
  `contextPath` - The path to map
  `globalName` - The name of the global scope to map to
Returns:
  `true` if the name was mapped, otherwise `false`

#### removeMapping

    boolean removeMapping(String hostName,
                        String contextPath)

Unregister a previously mapped global scope.

Parameters:
  `hostName` - The name of the host to unmap
  `contextPath` - The path for this host to unmap
Returns:
  `true` if the global scope was unmapped, otherwise `false`

#### getMappingTable

    Map<String,String> getMappingTable()

Query informations about the global scope mappings.

Returns:
  Map containing informations about the mappings

#### getGlobalNames

    Iterator<String> getGlobalNames()

Get list of global scope names.

Returns:
  Iterator for names of global scopes

#### getGlobalScopes

    Iterator<IGlobalScope> getGlobalScopes()

Get list of global scopes.

Returns:
  Iterator for global scopes objects

#### addListener

    void addListener(IScopeListener listener)

Add listener to get notified about scope events.

Parameters:
  `listener` - the listener to add

#### addListener

    void addListener(IConnectionListener listener)

Add listener to get notified about connection events.

Parameters:
  `listener` - the listener to add

#### removeListener

    void removeListener(IScopeListener listener)

Remove listener that got notified about scope events.

Parameters:
  `listener` - the listener to remove

#### removeListener

    void removeListener(IConnectionListener listener)

Remove listener that got notified about connection events.

Parameters:
  `listener` - the listener to remove