|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jwarp.service.web.JWarpServlet
The AAppController class is the central processing unit. The class is conforming the Java serlvet API and controls
initialisation of the different application areas. Such areas are:
- Loading of all text configurations
- Loading and initialising of all DB connections needed
- Initialising of all internal structures
- Loading of all ActionControllers and Actions
- Dispatching of commands to the registered Actions.
- Output of error mesages if necessary.
| Field Summary | |
protected IConfiguration |
config
Configuration manager that holds further DB and connection setup. |
protected IContext |
context
The application's/servlet's context |
protected WebContext |
contextPrototype
WebContext prototype for making the context params |
protected boolean |
debugging
Variable for switching on and off extensive debugging messages |
protected int |
errorNumber
If the application status is STATUS_RUNTIME_ERROR or STATUS_CONFIG_ERROR then this variable contains the xact error number. |
protected ILogWriter |
log
Log file access writer for the application. |
protected java.lang.String |
name
The name of this servlet. |
protected ServerData |
serverData
The base url for this application |
protected short |
status
current application status number. |
static short |
STATUS_CONFIG_ERROR
Status value that flags that the initialisation of the application failed because user data was false or missing. |
static short |
STATUS_CONFIGURED
Status value signalling that the application is ready to run. |
static short |
STATUS_CONFIGURING
Status value signalling that the application is ready to run. |
static short |
STATUS_CREATED
Status value signalling that the application was created but is not configured yet. |
static short |
STATUS_RUNNING
Status value signalling that the application is up and running. |
static short |
STATUS_RUNTIME_ERROR
Status value that flags that some runtime error occurred during start or run. |
static short |
STATUS_STARTING
Status value signalling that the application is starting up.. |
static short |
STATUS_STOPPED
Status value signalling that the application was stopped. |
static short |
STATUS_STOPPING
Status value sugnalling that the application is going down. |
protected ITicket |
systemTicket
The ticket for system access to the context. |
protected IWebService |
webService
|
| Constructor Summary | |
JWarpServlet()
|
|
| Method Summary | |
void |
configure(org.jdom.Element config)
|
void |
destroy()
Servlet destroy method. |
java.lang.String |
getAppName()
Get the servlet name. |
IConfiguration |
getConfig()
This method returns the config object for the application configuration. |
int |
getError()
Get the number of the current error (if any). |
java.lang.String |
getErrorMessage()
Get the error message of the current error (if any) |
ILogWriter |
getMainLog()
Return the controllers log object |
ServerData |
getServerData()
|
short |
getStatus()
This method return the actual status of the application The status constants from the class are used for a more detailed description. |
void |
handleException(java.lang.Exception e,
WebContext c)
|
void |
init(org.jwarp.service.web.ServletConfig config)
Servlet initialisation. |
boolean |
isDebugging()
This method returns if the application actually is running in debugging mode and so printing more detailed information on errors |
void |
reload()
Reloads the configuration file and reinitialises the PoolManager. |
void |
service(org.jwarp.service.web.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Servlet service method. |
void |
setDebugging(boolean debugging)
With this method debugging mode can be switched on and off |
| Field Detail |
protected java.lang.String name
protected boolean debugging
protected ServerData serverData
protected IContext context
protected WebContext contextPrototype
public static final short STATUS_CREATED
public static final short STATUS_CONFIGURING
public static final short STATUS_CONFIGURED
public static final short STATUS_STARTING
public static final short STATUS_RUNNING
public static final short STATUS_STOPPING
public static final short STATUS_STOPPED
public static final short STATUS_CONFIG_ERROR
public static final short STATUS_RUNTIME_ERROR
protected int errorNumber
protected IConfiguration config
protected ITicket systemTicket
protected short status
| JWebServer.STATUS_CREATED | The application is created but not configured yet |
| JWebServer.STATUS_CONFIGURED | The application is configured and ready to run. |
| JWebServer.STATUS_STARTING | The application is starting. |
| JWebServer.STATUS_RUNNING | The application is up and running. |
| JWebServer.STATUS_STOPPING | The application is running the shutdown proecedure. |
| JWebServer.STATUS_STOPPED | The application has been stopped running. |
| JWebServer.STATUS_CONFIG_ERROR | The application's configuration is invalid. |
| JWebServer.STATUS_RUNTIME_ERROR | The application encountered a fatal error during startup or run. |
protected ILogWriter log
protected IWebService webService
| Constructor Detail |
public JWarpServlet()
| Method Detail |
public void init(org.jwarp.service.web.ServletConfig config)
throws org.jwarp.service.web.ServletException
public void configure(org.jdom.Element config)
throws ConfigurationException
public final boolean isDebugging()
public final void setDebugging(boolean debugging)
public final java.lang.String getErrorMessage()
public final int getError()
public void destroy()
public void service(org.jwarp.service.web.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws org.jwarp.service.web.ServletException,
java.io.IOException
public void reload()
throws NotSupportedException
public final IConfiguration getConfig()
public final short getStatus()
public final java.lang.String getAppName()
public final ILogWriter getMainLog()
public ServerData getServerData()
public void handleException(java.lang.Exception e,
WebContext c)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||