public abstract class SwarmWebApplication extends WaspWebApplication
| Constructor and Description |
|---|
SwarmWebApplication() |
| Modifier and Type | Method and Description |
|---|---|
WaspActionFactory |
getActionFactory()
Returns factory for action mapping.
|
protected abstract Object |
getHiveKey()
Returns the key to specify the hive.
|
StrategyFactory |
getStrategyFactory()
Returns the factory that will be used to create strategies for each session.
|
protected void |
init()
triggers the setup of the factories and the hive.
|
protected void |
setActionFactory(WaspActionFactory factory)
Allows the
ActionFactory field to be set once. |
protected void |
setStrategyFactory(StrategyFactory factory)
Allows the
StrategyFactory field to be set once. |
protected void |
setupActionFactory()
Called by the
WaspWebApplication.init(). |
protected abstract void |
setUpHive()
Set up a Hive for this Application.
|
protected void |
setupStrategyFactory()
Called by the
WaspWebApplication.init(). |
newSession, onDestroyaddResourceReplacement, addResourceReplacement, get, getAjaxRequestTargetListeners, getAjaxRequestTargetProvider, getAndRemoveBufferedResponse, getApplicationKey, getConfigurationType, getFilterFactoryManager, getInitParameter, getMimeType, getServletContext, getSessionAttributePrefix, getUpdateAutoLabelsOnAjaxRequests, getWicketFilter, hasBufferedResponse, hasFilterFactoryManager, internalDestroy, internalInit, logEventTarget, logResponseTarget, mount, mountPackage, mountPage, mountResource, newAjaxRequestTarget, newWebRequest, newWebResponse, outputDevelopmentModeWarning, renderXmlDecl, sessionUnbound, setAjaxRequestTargetProvider, setConfigurationType, setServletContext, setWicketFilter, storeBufferedResponse, unmountconfigure, createRequestCycle, decorateHeaderResponse, exists, fetchCreateAndSetSession, get, getApplicationKeys, getApplicationListeners, getApplicationSettings, getBehaviorInstantiationListeners, getComponentInitializationListeners, getComponentInstantiationListeners, getComponentOnAfterRenderListeners, getComponentOnConfigureListeners, getComponentPostOnBeforeRenderListeners, getComponentPreOnBeforeRenderListeners, getConverterLocator, getDebugSettings, getExceptionMapperProvider, getExceptionSettings, getFrameworkSettings, getHeaderContributorListeners, getHomePage, getInitializers, getJavaScriptLibrarySettings, getMapperContext, getMarkupSettings, getMetaData, getName, getPageFactory, getPageManagerContext, getPageManagerProvider, getPageRendererProvider, getPageSettings, getRequestCycleListeners, getRequestCycleProvider, getRequestCycleSettings, getRequestLogger, getRequestLoggerSettings, getResourceBundles, getResourceReferenceRegistry, getResourceSettings, getRootRequestMapper, getRootRequestMapperAsCompound, getSecuritySettings, getSessionListeners, getSessionStore, getSessionStoreProvider, getSharedResources, getStoreSettings, initApplication, initializeComponents, newConverterLocator, newMapperContext, newPageFactory, newRequestLogger, newResourceBundles, newResourceReferenceRegistry, newSharedResources, onEvent, setApplicationSettings, setDebugSettings, setExceptionSettings, setFrameworkSettings, setHeaderResponseDecorator, setJavaScriptLibrarySettings, setMarkupSettings, setMetaData, setName, setPageManagerProvider, setPageRendererProvider, setPageSettings, setRequestCycleProvider, setRequestCycleSettings, setRequestLoggerSettings, setResourceSettings, setRootRequestMapper, setSecuritySettings, setSessionStoreProvider, setStoreSettings, usesDeploymentConfig, usesDevelopmentConfig, validateInitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLoginPageprotected void setupActionFactory()
WaspWebApplicationWaspWebApplication.init(). use this to create and initialize your
factory. The factory created here should be returned when calling
WaspApplication.getActionFactory().setupActionFactory in class WaspWebApplicationWaspWebApplication.setupActionFactory()protected final void setActionFactory(WaspActionFactory factory)
ActionFactory field to be set once.factory - the actionfactoryIllegalStateException - if the factory is set more than once.protected void setupStrategyFactory()
WaspWebApplicationWaspWebApplication.init(). use this to create and initialize your
factory. The factory created here should be returned when calling
WaspApplication.getStrategyFactory().setupStrategyFactory in class WaspWebApplicationWaspWebApplication.setupStrategyFactory()protected final void setStrategyFactory(StrategyFactory factory)
StrategyFactory field to be set once.factory - the strategyfactoryIllegalStateException - if the factory is set more than once.protected void init()
init in class WaspWebApplicationWaspWebApplication.init()protected abstract void setUpHive()
PolicyFileHiveFactory factory = new PolicyFileHiveFactory();
factory.addPolicyFile("/policy.hive");
HiveMind.registerHive(getHiveKey(), factory);
Note that you must setup the actionfactory before you can setup the hive. Note that
the hive is not automatically unregistered since there is a chance you want to share it with
another webapp. If you want to unregister the hive please do so in the WaspWebApplication.onDestroy()public WaspActionFactory getActionFactory()
WaspApplicationWaspApplication.getActionFactory()public StrategyFactory getStrategyFactory()
WaspApplicationWaspApplication.getStrategyFactory()protected abstract Object getHiveKey()
Copyright © 2015. All rights reserved.