|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.terminal.gwt.server.AbstractWebApplicationContext
public abstract class AbstractWebApplicationContext
Base class for web application contexts (including portlet contexts) that handles the common tasks.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.service.ApplicationContext |
|---|
ApplicationContext.TransactionListener |
| Field Summary | |
|---|---|
protected HashSet<Application> |
applications
|
protected HashMap<Application,AbstractCommunicationManager> |
applicationToAjaxAppMgrMap
|
protected WebBrowser |
browser
|
protected Collection<ApplicationContext.TransactionListener> |
listeners
|
| Constructor Summary | |
|---|---|
AbstractWebApplicationContext()
|
|
| Method Summary | |
|---|---|
void |
addTransactionListener(ApplicationContext.TransactionListener listener)
Adds a transaction listener to this context. |
protected void |
endTransaction(Application application,
Object request)
Sends a notification that a transaction has ended. |
String |
generateApplicationResourceURL(ApplicationResource resource,
String mapKey)
Generate a URL that can be used as the relative location of e.g. |
Collection<Application> |
getApplications()
Returns a collection of all the applications in this context. |
WebBrowser |
getBrowser()
Get the web browser associated with this application context. |
long |
getLastRequestTime()
|
long |
getTotalSessionTime()
|
String |
getURLKey(URL context,
String relativeUri)
Gets the identifier (key) from an application resource URL. |
boolean |
isApplicationResourceURL(URL context,
String relativeUri)
Tests if a URL is for an application resource (APP/...). |
protected void |
removeApplication(Application application)
|
void |
removeTransactionListener(ApplicationContext.TransactionListener listener)
Removes a transaction listener from this context. |
void |
setLastRequestTime(long time)
Sets the time spent servicing the last request in the session and updates the total time spent servicing requests in this session. |
protected void |
startTransaction(Application application,
Object request)
Sends a notification that a transaction is starting. |
void |
valueBound(HttpSessionBindingEvent arg0)
|
void |
valueUnbound(HttpSessionBindingEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.service.ApplicationContext |
|---|
getBaseDirectory |
| Field Detail |
|---|
protected Collection<ApplicationContext.TransactionListener> listeners
protected final HashSet<Application> applications
protected WebBrowser browser
protected HashMap<Application,AbstractCommunicationManager> applicationToAjaxAppMgrMap
| Constructor Detail |
|---|
public AbstractWebApplicationContext()
| Method Detail |
|---|
public void addTransactionListener(ApplicationContext.TransactionListener listener)
ApplicationContext
addTransactionListener in interface ApplicationContextApplicationContext.addTransactionListener(com.vaadin.service.ApplicationContext.TransactionListener)public void removeTransactionListener(ApplicationContext.TransactionListener listener)
ApplicationContext
removeTransactionListener in interface ApplicationContextlistener - the listener to be removed.ApplicationContext.TransactionListener
protected void startTransaction(Application application,
Object request)
application - The application associated with the transaction.request - the HTTP or portlet request that triggered the transaction.
protected void endTransaction(Application application,
Object request)
application - The application associated with the transaction.request - the HTTP or portlet request that triggered the transaction.public void valueBound(HttpSessionBindingEvent arg0)
valueBound in interface HttpSessionBindingListenerHttpSessionBindingListener.valueBound(HttpSessionBindingEvent)public void valueUnbound(HttpSessionBindingEvent event)
valueUnbound in interface HttpSessionBindingListenerHttpSessionBindingListener.valueUnbound(HttpSessionBindingEvent)public WebBrowser getBrowser()
public Collection<Application> getApplications()
ApplicationContext
getApplications in interface ApplicationContextprotected void removeApplication(Application application)
public String generateApplicationResourceURL(ApplicationResource resource,
String mapKey)
ApplicationContextApplicationResource.
This method should only be called from the processing of a UIDL request,
not from a background thread. The return value is null if used outside a
suitable request.
generateApplicationResourceURL in interface ApplicationContextmapKey - a key for the resource that can later be extracted from a URL
with ApplicationContext.getURLKey(URL, String)
public boolean isApplicationResourceURL(URL context,
String relativeUri)
ApplicationContext
isApplicationResourceURL in interface ApplicationContext
public String getURLKey(URL context,
String relativeUri)
ApplicationContextApplicationContext.generateApplicationResourceURL(ApplicationResource, String) when
creating the URL.
getURLKey in interface ApplicationContextpublic long getTotalSessionTime()
public void setLastRequestTime(long time)
time - the time spent in the last request.public long getLastRequestTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||