|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.boylesoftware.cb2.presentation.servlet.CB2Application
This web-application wide singleton represents this CB2 based
application. When you use Struts modules you may end up with
setting up CB2 plugin multiple times and then the plugin will
install it's request processor (ControllerServlet
)
multiple times for different modules. Regardless of how many
modules and CB2 request processors you have they all will share
one CB2Application
instance, which will provide
them with access to the application context and business logic
level.
This class is not of any interest to the user application code.
Field Summary |
Fields inherited from interface com.boylesoftware.cb2.StatusProvider |
TIMESTAMP_FORMAT |
Method Summary | |
ApplicationContext |
getApplicationContext()
Gets our application context. |
BLManager |
getBLManager()
Gets our business logic level manager. |
EventStatistics |
getEventStats(java.lang.String eventName)
Interface method implementation. |
int |
getNumberOfErrors()
Gets the number of registered errors in all user sessions. |
int |
getNumberOfSessions()
Gets number of currently registered user sessions. |
byte[] |
getStats()
Retrieves information about the servlet container and user sessions and returns it as an XML text. |
boolean |
isLocked()
Tells if the application is locked by a setLock call. |
void |
setLock(boolean lock)
Sets the application "locked" status. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public ApplicationContext getApplicationContext()
public BLManager getBLManager()
public byte[] getStats() throws java.io.UnsupportedEncodingException
getStats
in interface StatusProvider
java.io.UnsupportedEncodingException
- if UTF-8 is not supported on this
platform, which is practically impossible.public EventStatistics getEventStats(java.lang.String eventName)
requests
- number of requests.sessionActivity_xxx
- number of requests for the
session with BL session id xxx.
getEventStats
in interface StatusProvider
eventName
- implementation specific event name, for which current
statistics are requested.
null
if the event is unknown.public boolean isLocked()
setLock
call.
true
if the application is locked.public void setLock(boolean lock)
lockedUrl
CB2 plugin property page).
lock
- the new lock state -- true
locks the
application, false
unlocks it.public int getNumberOfSessions()
public int getNumberOfErrors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |