winstone
Class HostConfiguration

java.lang.Object
  extended by winstone.HostConfiguration
All Implemented Interfaces:
java.lang.Runnable

public class HostConfiguration
extends java.lang.Object
implements java.lang.Runnable

Manages the references to individual webapps within the container. This object handles the mapping of url-prefixes to webapps, and init and shutdown of any webapps it manages.

Version:
$Id: HostConfiguration.java,v 1.8 2007/08/02 06:16:00 rickknowles Exp $
Author:
Rick Knowles

Constructor Summary
HostConfiguration(java.lang.String hostname, Cluster cluster, ObjectPool objectPool, java.lang.ClassLoader commonLibCL, java.io.File[] commonLibCLPaths, java.util.Map args, java.io.File webappsDir)
           
 
Method Summary
 void destroy()
           
 java.lang.String getHostname()
           
 WebAppConfiguration getWebAppBySessionKey(java.lang.String sessionKey)
           
 WebAppConfiguration getWebAppByURI(java.lang.String uri)
           
protected  java.io.File getWebRoot(java.io.File requestedWebroot, java.io.File warfile)
          Setup the webroot.
protected  void initMultiWebappDir(java.io.File webappsDir)
           
protected  WebAppConfiguration initWebApp(java.lang.String prefix, java.io.File webRoot, java.lang.String contextName)
           
 void invalidateExpiredSessions()
           
 void reloadWebApp(java.lang.String prefix)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HostConfiguration

public HostConfiguration(java.lang.String hostname,
                         Cluster cluster,
                         ObjectPool objectPool,
                         java.lang.ClassLoader commonLibCL,
                         java.io.File[] commonLibCLPaths,
                         java.util.Map args,
                         java.io.File webappsDir)
                  throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getWebAppByURI

public WebAppConfiguration getWebAppByURI(java.lang.String uri)

initWebApp

protected WebAppConfiguration initWebApp(java.lang.String prefix,
                                         java.io.File webRoot,
                                         java.lang.String contextName)
                                  throws java.io.IOException
Throws:
java.io.IOException

getHostname

public java.lang.String getHostname()

destroy

public void destroy()

invalidateExpiredSessions

public void invalidateExpiredSessions()

run

public void run()
Specified by:
run in interface java.lang.Runnable

reloadWebApp

public void reloadWebApp(java.lang.String prefix)

getWebRoot

protected java.io.File getWebRoot(java.io.File requestedWebroot,
                                  java.io.File warfile)
                           throws java.io.IOException
Setup the webroot. If a warfile is supplied, extract any files that the war file is newer than. If none is supplied, use the default temp directory.

Throws:
java.io.IOException

initMultiWebappDir

protected void initMultiWebappDir(java.io.File webappsDir)

getWebAppBySessionKey

public WebAppConfiguration getWebAppBySessionKey(java.lang.String sessionKey)


Copyright © 2013. All Rights Reserved.