com.caucho.server.host
Class HostContainer

java.lang.Object
  extended by com.caucho.server.host.HostContainer
All Implemented Interfaces:
DispatchBuilder

public class HostContainer
extends java.lang.Object
implements DispatchBuilder

Resin's host container implementation.


Constructor Summary
HostContainer()
          Creates the webApp with its environment loader.
 
Method Summary
 void addEarDefault(EarConfig init)
          Adds an ear default
 void addHost(HostConfig hostConfig)
          Adds a host.
 void addHostDefault(HostConfig init)
          Adds a host default
 void addHostDeploy(HostExpandDeployGenerator hostDeploy)
          Adds a host deploy
 void addWebAppDefault(WebAppConfig init)
          Adds a web-app default
 Invocation buildInvocation(Invocation invocation)
          Creates the invocation.
 void clearCache()
          Clears the cache.
 HostExpandDeployGenerator createHostDeploy()
          Creates a host deploy
 RewriteDispatch createRewriteDispatch()
          Adds rewrite-dispatch.
 void destroy()
          Closes the container.
 java.lang.ClassLoader getClassLoader()
          Gets the environment class loader.
 DispatchServer getDispatchServer()
          Gets the dispatch server.
 java.util.ArrayList<EarConfig> getEarDefaultList()
          Returns the list of ear defaults
 WebApp getErrorWebApp()
          Returns the error webApp during startup.
 Host getHost(java.lang.String hostName, int port)
          Returns the matching host.
 java.util.ArrayList<HostConfig> getHostDefaultList()
          Returns the list of host defaults
 java.util.ArrayList<HostController> getHostList()
           
 Path getRootDirectory()
          Gets the root directory.
 java.lang.String getURL()
          Gets the URL for the default server.
 java.util.ArrayList<WebAppConfig> getWebAppDefaultList()
          Returns the list of web-app defaults
 void setClassLoader(EnvironmentClassLoader classLoader)
          Gets the environment class loader.
 void setDispatchServer(DispatchServer server)
          Sets the dispatch server.
 void setRootDir(Path path)
          Deprecated.  
 void setRootDirectory(Path path)
          Sets the root directory.
 void setURL(java.lang.String url)
          Sets the URL for the default server.
 void start()
          Starts the container.
 void stop()
          Stops the container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostContainer

public HostContainer()
Creates the webApp with its environment loader.

Method Detail

getClassLoader

public java.lang.ClassLoader getClassLoader()
Gets the environment class loader.


setClassLoader

public void setClassLoader(EnvironmentClassLoader classLoader)
Gets the environment class loader.


setURL

public void setURL(java.lang.String url)
Sets the URL for the default server.


getURL

public java.lang.String getURL()
Gets the URL for the default server.


setDispatchServer

public void setDispatchServer(DispatchServer server)
Sets the dispatch server.


getDispatchServer

public DispatchServer getDispatchServer()
Gets the dispatch server.


getRootDirectory

public Path getRootDirectory()
Gets the root directory.


setRootDirectory

public void setRootDirectory(Path path)
Sets the root directory.


setRootDir

public void setRootDir(Path path)
Deprecated. 

Sets the root directory (obsolete).


addHostDefault

public void addHostDefault(HostConfig init)
Adds a host default


getHostDefaultList

public java.util.ArrayList<HostConfig> getHostDefaultList()
Returns the list of host defaults


createHostDeploy

public HostExpandDeployGenerator createHostDeploy()
Creates a host deploy


addHostDeploy

public void addHostDeploy(HostExpandDeployGenerator hostDeploy)
Adds a host deploy


addHost

public void addHost(HostConfig hostConfig)
             throws java.lang.Exception
Adds a host.

Throws:
java.lang.Exception

addWebAppDefault

public void addWebAppDefault(WebAppConfig init)
Adds a web-app default


getWebAppDefaultList

public java.util.ArrayList<WebAppConfig> getWebAppDefaultList()
Returns the list of web-app defaults


addEarDefault

public void addEarDefault(EarConfig init)
Adds an ear default


getEarDefaultList

public java.util.ArrayList<EarConfig> getEarDefaultList()
Returns the list of ear defaults


createRewriteDispatch

public RewriteDispatch createRewriteDispatch()
Adds rewrite-dispatch.


clearCache

public void clearCache()
Clears the cache.


buildInvocation

public Invocation buildInvocation(Invocation invocation)
                           throws java.lang.Throwable
Creates the invocation.

Specified by:
buildInvocation in interface DispatchBuilder
Throws:
java.lang.Throwable

getHostList

public java.util.ArrayList<HostController> getHostList()

getHost

public Host getHost(java.lang.String hostName,
                    int port)
Returns the matching host.


getErrorWebApp

public WebApp getErrorWebApp()
Returns the error webApp during startup.


start

public void start()
Starts the container.


stop

public void stop()
Stops the container.


destroy

public void destroy()
Closes the container.