|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.jwarp.service.AService
|
+--org.jwarp.service.web.WebService
The WebService 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 java.lang.String |
cacheName
|
protected ICacheService |
cacheService
|
(package private) IDispatchAlg |
dispatchHandler
Dispatch handler alg reference |
protected boolean |
enableCaching
Service reference: Web service reference. |
(package private) java.util.Hashtable |
forwarders
Forward handler alg reference |
(package private) IRequestInit |
requestInit
IRequestInit web alg reference |
protected int |
serviceCounter
Counting the active services. |
(package private) ISessionInit |
sessionInit
ISessionInit web alg reference |
protected long |
shutdownTime
|
protected ICache |
webCache
|
protected WebStatus |
webStatus
|
| Fields inherited from class org.jwarp.service.AService |
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket |
| Fields inherited from interface org.jwarp.service.web.IWebService |
SERVICE_TYPE |
| Fields inherited from interface org.jwarp.service.IService |
SERVICE_STATUS_CREATED, SERVICE_STATUS_NOT_AVAILABLE, SERVICE_STATUS_READY, SERVICE_STATUS_RESUMING, SERVICE_STATUS_RUNNING, SERVICE_STATUS_STARTING, SERVICE_STATUS_STOPPED, SERVICE_STATUS_STOPPING, SERVICE_STATUS_SUSPENDED |
| Constructor Summary | |
WebService()
|
|
| Method Summary | |
void |
configure(org.jdom.Element config)
Pass the Configuration to the Configurable
class. |
void |
disableCache()
|
ICache |
enableCache(java.lang.String serviceName,
java.lang.String cacheID)
|
protected void |
enteringServiceMethod()
Increment service count |
void |
forward(java.lang.String target,
java.lang.String url,
WebContext webContext)
|
long |
getShutdownTime()
|
WebStatus |
getWebStatus()
Get an extended web service status. |
void |
handleException(java.lang.Exception e,
WebContext c)
|
void |
initRequest(WebContext webContext)
|
void |
initSession(WebContext webContext)
|
protected void |
leavingServiceMethod()
Decrement service count |
int |
numServices()
Return number of services operating at this moment |
void |
performRequest(WebContext webContext)
Servlet service method. |
void |
setShutdownTime(long millis)
|
void |
shutdown(ITicket ticket)
Shutdown the service |
void |
start(ITicket ticket)
Start the service with the given configuration. |
void |
suspend(ITicket ticket)
Suspend the service |
| Methods inherited from class org.jwarp.service.AService |
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface org.jwarp.service.IService |
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel |
| Methods inherited from interface org.jwarp.common.IExceptionProvider |
addExceptionListener, getExceptionListeners, removeAllExceptionListeners, removeExceptionListener |
| Field Detail |
protected WebStatus webStatus
ISessionInit sessionInit
IRequestInit requestInit
IDispatchAlg dispatchHandler
java.util.Hashtable forwarders
protected int serviceCounter
protected long shutdownTime
protected boolean enableCaching
protected ICache webCache
protected java.lang.String cacheName
protected ICacheService cacheService
| Constructor Detail |
public WebService()
| Method Detail |
public void configure(org.jdom.Element config)
throws ConfigurationException
IConfigurableConfiguration to the Configurable
class. This method must always be called after the constructor and before any other method.configure in interface IConfigurableconfigure in class AServiceorg.jwarp.service.configuration.IConfigurableconfiguration - the class configurations.
public ICache enableCache(java.lang.String serviceName,
java.lang.String cacheID)
enableCache in interface IWebServicepublic void disableCache()
disableCache in interface IWebService
public void initSession(WebContext webContext)
throws InitializationException
public void initRequest(WebContext webContext)
throws InitializationException
public void performRequest(WebContext webContext)
IWebServiceperformRequest in interface IWebService
public void forward(java.lang.String target,
java.lang.String url,
WebContext webContext)
throws InvalidForwardException,
InvalidForwardTypeException
forward in interface IWebServicepublic WebStatus getWebStatus()
getWebStatus in interface IWebServiceprotected final void enteringServiceMethod()
protected final void leavingServiceMethod()
public final int numServices()
numServices in interface IWebServiceorg.jwarp.service.web.IWebService
public void start(ITicket ticket)
throws java.lang.SecurityException,
ServiceInitializationException
IServicestart in interface IServicestart in class AServiceorg.jwarp.service.IServiceServiceInitializationException - If the service could not startedjava.lang.SecurityException - If access was denied.
public void handleException(java.lang.Exception e,
WebContext c)
public void shutdown(ITicket ticket)
throws java.lang.SecurityException,
ServiceRuntimeException
IServiceshutdown in interface IServiceshutdown in class AServiceorg.jwarp.service.IServiceticket - The user ticketServiceRuntimeException - If the service could not be shut ownjava.lang.SecurityException - If access was denied.
public void suspend(ITicket ticket)
throws java.lang.SecurityException,
ServiceRuntimeException
IServicesuspend in interface IServicesuspend in class AServiceorg.jwarp.service.IServiceticket - The user ticketServiceRuntimeException - If the service could not be suspendedjava.lang.SecurityException - If access was denied.public void setShutdownTime(long millis)
public long getShutdownTime()
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||