|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.AddonContext
public class AddonContext
Point of entry for add-ons for integrating into various aspects of the
framework. One add-on context is initialized for each Vaadin Servlet or
Portlet instance and upon initialization, every AddonContextListener
that can be found is notified to let it add listeners to the context.
By default, AddonContextListeners are loaded using ServiceLoader
,
which means that the file
META-INF/services/com.vaadin.server.AddonContextListener will be checked for
lines containing fully qualified names of classes to use. This behavior can
however be overridden for custom deployment situations (e.g. to use CDI or
OSGi) by overriding VaadinService.getAddonContextListeners()
.
Constructor Summary | |
---|---|
AddonContext(VaadinService vaadinService)
Creates a new context using a given vaadin service. |
Method Summary | |
---|---|
void |
addBootstrapListener(BootstrapListener listener)
Shorthand for adding a bootstrap listener that will be added to every new service session. |
void |
destroy()
Destroys this context, causing all initialized listeners to be invoked. |
VaadinService |
getService()
Gets the vaadin service for this context. |
void |
init()
Initializes this context, causing all found listeners to be notified. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AddonContext(VaadinService vaadinService)
vaadinService
- the vaadin service for the associated servlet or portlet.Method Detail |
---|
public VaadinService getService()
public void init()
ServiceLoader
, but the
VaadinService
can provide an alternative implementation.
This method is not intended to be used by add-ons, but instead by the part of the framework that created this context object.
public void destroy()
This method is not intended to be used by add-ons, but instead by the part of the framework that created this context object.
public void addBootstrapListener(BootstrapListener listener)
listener
- the bootstrap listener that should be added to all new
applications.VaadinServiceSession.addBootstrapListener(BootstrapListener)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |