WUI : API


org.westofj.wui
Class WApplication

java.lang.Object
  extended byorg.westofj.wui.WApplication

public class WApplication
extends Object

Captures global application information. A single application instance is created when the controller servlet is initialized. Each WRunner instance has access to the same application instance.

WApplication may be extended to add additional global resources and methods.

Version:
$Revision: 1.3 $, $Date: 2004/03/08 01:57:35 $
Author:
bill

Constructor Summary
WApplication()
          Constructs an application.
 
Method Summary
 void destroy()
          Invoked when the application is destroyed by the controlling servlet.
 void destroyRunner(WRunner runner)
          Invoked when a new WRunner is destroyed by the controlling servlet.
 String getInitParameter(String name)
          Returns the value of the specified initialization parameter from the servlets configuration.
 String getRealPath(String path)
          Returns a String containing the real path for a given virtual path.
 ServletContext getServletContext()
          Returns the servlet context of the WUI application.
 String getServletName()
          Returns the name of the controlling servlet.
 void init()
          Invoked when the application is first created by the controlling servlet.
 void initRunner(WRunner runner)
          Invoked when a new WRunner is created by the controlling servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WApplication

public WApplication()
Constructs an application.

Method Detail

getInitParameter

public final String getInitParameter(String name)
Returns the value of the specified initialization parameter from the servlets configuration.

Parameters:
name - the name of the initialization parameter.
Returns:
String the value of the initialization parameter.

getServletName

public final String getServletName()
Returns the name of the controlling servlet.

Returns:
String the name of the controlling servlet.

getRealPath

public final String getRealPath(String path)
Returns a String containing the real path for a given virtual path.

Returns:
a String specifying the real path, or null if the translation cannot be performed

getServletContext

public final ServletContext getServletContext()
Returns the servlet context of the WUI application.

Returns:
the servlet context of the WUI application.

init

public void init()
Invoked when the application is first created by the controlling servlet.


destroy

public void destroy()
Invoked when the application is destroyed by the controlling servlet.


initRunner

public void initRunner(WRunner runner)
Invoked when a new WRunner is created by the controlling servlet.

Parameters:
runner - the runner being created.

destroyRunner

public void destroyRunner(WRunner runner)
Invoked when a new WRunner is destroyed by the controlling servlet.

Parameters:
runner - the runner being destroyed.

Copyright (c) 2003 West of J - All rights reserved.