## org.red5.server.tomcat
Class TomcatVHostLoader

    java.lang.Object
      org.red5.server.LoaderBase
          org.red5.server.tomcat.TomcatLoader
              org.red5.server.tomcat.TomcatVHostLoader

All Implemented Interfaces:
  LoaderMBean, TomcatVHostLoaderMBean, ApplicationContextAware

    public class TomcatVHostLoader

extends TomcatLoader
implements TomcatVHostLoaderMBean

Red5 loader for Tomcat virtual hosts.

Author:
  Paul Gregoire (mondain@gmail.com)

Nested Class Summary

Nested classes/interfaces inherited from class org.red5.server.tomcat.TomcatLoader
`TomcatLoader.DirectoryFilter`

Field Summary
`protected boolean` `autoDeploy`
`protected String` `domain`
`protected boolean` `liveDeploy`
`protected String` `name`
`protected boolean` `startChildren`
`protected boolean` `unpackWARs`
`protected String` `webappRoot` Base web applications directory

Fields inherited from class org.red5.server.tomcat.TomcatLoader
`address, connectionProperties, connector, connectors, defaultParentContextKey, defaultSpringConfigLocation, embedded, engine, host, hosts, realm, serviceEngineName, valves`

Fields inherited from class org.red5.server.LoaderBase
`applicationContext, loader, red5AppCtx, webappFolder`

Constructor Summary
`TomcatVHostLoader()`

Method Summary
`void` `addAlias(String alias)` Adds an alias to the current host.
`void` `addValve(Valve valve)` Adds a valve to the current host.
`Host` `createHost()` Create a standard host.
`boolean` `getAutoDeploy()`
`String` `getDefaultApplicationContextId()`
`String` `getDomain()`
`Host` `getHost()` Returns the current host.
`boolean` `getLiveDeploy()`
`String` `getName()`
`boolean` `getStartChildren()`
`boolean` `getUnpackWARs()`
`String` `getWebappRoot()`
`void` `init()` Initialization.
`void` `registerJMX()`
`void` `removeAlias(String alias)` Removes an alias from the current host.
`void` `removeValve(String valveInfo)` Removes a valve from the current host.
`void` `setAutoDeploy(boolean autoDeploy)`
`void` `setContexts(Map<String,String> contexts)` Set additional contexts.
`void` `setDefaultApplicationContextId(String defaultApplicationContextId)`
`void` `setDomain(String domain)`
`void` `setLiveDeploy(boolean liveDeploy)`
`void` `setName(String name)`
`void` `setStartChildren(boolean startChildren)`
`void` `setUnpackWARs(boolean unpackWARs)`
`void` `setWebappRoot(String webappRoot)`
`boolean` `startWebApplication(String applicationName)` Starts a web application and its red5 (spring) component.
`void` `uninit()` Un-initialization.
`void` `unregisterJMX()`

Methods inherited from class org.red5.server.tomcat.TomcatLoader
`addContext, addContext, getBaseHost, getConnector, getEmbedded, getEngine, getHostId, getRealm, removeContext, setAddress, setBaseHost, setConnectionProperties, setConnector, setConnectors, setEmbedded, setHost, setHosts, setRealm, setValves, shutdown`

Methods inherited from class org.red5.server.LoaderBase
`getApplicationContext, getApplicationLoader, getRed5ApplicationContext, getRed5ApplicationContexts, removeRed5ApplicationContext, setApplicationContext, setApplicationLoader, setRed5ApplicationContext, setWebappFolder`

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

Methods inherited from interface org.red5.server.tomcat.TomcatVHostLoaderMBean
`addContext, removeContext, shutdown`

Methods inherited from interface org.springframework.context.ApplicationContextAware
`setApplicationContext`

Field Detail

### webappRoot

    protected String webappRoot

  Base web applications directory

### name

    protected String name

### domain

    protected String domain

### autoDeploy

    protected boolean autoDeploy

### liveDeploy

    protected boolean liveDeploy

### startChildren

    protected boolean startChildren

### unpackWARs

    protected boolean unpackWARs

Constructor Detail

### TomcatVHostLoader

    public TomcatVHostLoader()

Method Detail

### init

    public void init()

  Initialization.

  Specified by:
    `init` in interface `LoaderMBean`
  Specified by:
    `init` in interface `TomcatVHostLoaderMBean`
  Overrides:
    `init` in class `TomcatLoader`

### uninit

    public void uninit()

  Un-initialization.

  Specified by:
    `uninit` in interface `TomcatVHostLoaderMBean`

### startWebApplication

    public boolean startWebApplication(String applicationName)

  Starts a web application and its red5 (spring) component. This is basically a stripped down version of init().

  Specified by:
    `startWebApplication` in interface `LoaderMBean`
  Specified by:
    `startWebApplication` in interface `TomcatVHostLoaderMBean`
  Overrides:
    `startWebApplication` in class `TomcatLoader`
  Returns:
    true on success

### createHost

    public Host createHost()

  Create a standard host.

  Returns:
    host

### getHost

    public Host getHost()

  Returns the current host.

  Specified by:
    `getHost` in interface `TomcatVHostLoaderMBean`
  Overrides:
    `getHost` in class `TomcatLoader`
  Returns:
    host

### addAlias

    public void addAlias(String alias)

  Adds an alias to the current host.

  Specified by:
    `addAlias` in interface `TomcatVHostLoaderMBean`
  Parameters:
    `alias` - alias

### removeAlias

    public void removeAlias(String alias)

  Removes an alias from the current host.

  Specified by:
    `removeAlias` in interface `TomcatVHostLoaderMBean`
  Parameters:
    `alias` - Alias

### addValve

    public void addValve(Valve valve)

  Adds a valve to the current host.

  Specified by:
    `addValve` in interface `TomcatVHostLoaderMBean`
  Parameters:
    `valve` - Valve

### removeValve

    public void removeValve(String valveInfo)

  Removes a valve from the current host.

  Specified by:
    `removeValve` in interface `TomcatVHostLoaderMBean`
  Parameters:
    `valveInfo` - Valve Information.

### setContexts

    public void setContexts(Map<String,String> contexts)

  Set additional contexts.

  Overrides:
    `setContexts` in class `TomcatLoader`
  Parameters:
    `contexts` - Map of contexts

### getName

    public String getName()

  Specified by:
    `getName` in interface `TomcatVHostLoaderMBean`

### setName

    public void setName(String name)

  Specified by:
    `setName` in interface `TomcatVHostLoaderMBean`

### getDomain

    public String getDomain()

  Specified by:
    `getDomain` in interface `TomcatVHostLoaderMBean`

### setDomain

    public void setDomain(String domain)

  Specified by:
    `setDomain` in interface `TomcatVHostLoaderMBean`

### getWebappRoot

    public String getWebappRoot()

  Specified by:
    `getWebappRoot` in interface `TomcatVHostLoaderMBean`

### setWebappRoot

    public void setWebappRoot(String webappRoot)

  Specified by:
    `setWebappRoot` in interface `TomcatVHostLoaderMBean`

### getAutoDeploy

    public boolean getAutoDeploy()

  Specified by:
    `getAutoDeploy` in interface `TomcatVHostLoaderMBean`

### setAutoDeploy

    public void setAutoDeploy(boolean autoDeploy)

  Specified by:
    `setAutoDeploy` in interface `TomcatVHostLoaderMBean`

### getLiveDeploy

    public boolean getLiveDeploy()

  Specified by:
    `getLiveDeploy` in interface `TomcatVHostLoaderMBean`

### setLiveDeploy

    public void setLiveDeploy(boolean liveDeploy)

  Specified by:
    `setLiveDeploy` in interface `TomcatVHostLoaderMBean`

### getStartChildren

    public boolean getStartChildren()

  Specified by:
    `getStartChildren` in interface `TomcatVHostLoaderMBean`

### setStartChildren

    public void setStartChildren(boolean startChildren)

  Specified by:
    `setStartChildren` in interface `TomcatVHostLoaderMBean`

### getUnpackWARs

    public boolean getUnpackWARs()

  Specified by:
    `getUnpackWARs` in interface `TomcatVHostLoaderMBean`

### setUnpackWARs

    public void setUnpackWARs(boolean unpackWARs)

  Specified by:
    `setUnpackWARs` in interface `TomcatVHostLoaderMBean`

### getDefaultApplicationContextId

    public String getDefaultApplicationContextId()

### setDefaultApplicationContextId

    public void setDefaultApplicationContextId(String defaultApplicationContextId)

### registerJMX

    public void registerJMX()

  Specified by:
    `registerJMX` in interface `TomcatVHostLoaderMBean`
  Overrides:
    `registerJMX` in class `TomcatLoader`

### unregisterJMX

    public void unregisterJMX()

  Specified by:
    `unregisterJMX` in interface `TomcatVHostLoaderMBean`

Copyright © 2006-2010 The Red5 Project