|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.invocation.lifecycle.Lifecycle
public final class Lifecycle
initialises all bundles and manages the life-cycle of reloadable components.
The Lifecycle singleton initialises all bundles of the pulse
container and the config pool. If the container is configured for reloading
the Lifecycle singleton watches registered resources for changes and
restarts the affected sub-systems on demand.
Moreover it globally initialises the HibernateDataSource, all Bundles and their resources as well as the ContentRegistry and
Sitemap.
The Lifecycle sets up a global JAXB context, registers the IP2CountryProvider and sets up the MailQueue as well as the VirtualFileSystem.
PoorMansCache, Bundle, HibernateDataSource, ContentRegistry| Method Summary | |
|---|---|
protected static java.util.Collection<java.util.Locale> |
convertLocaleList(java.util.Collection<Locale> collection,
boolean onlyActive)
converts the given list of org.torweg.pulse.service.request.Locale to a list of java.util.Locale. |
static java.util.Collection<java.util.Locale> |
getActiveLocales()
returns a list of all active {@link Locale}s. |
static AttributeFactory |
getAttributeFactory()
returns the AttributeFactory. |
static java.io.File |
getBasePath()
returns the containers root directory. |
static Bundle |
getBundle(java.lang.String name)
get the Bundle with the specified name. |
static java.util.Collection<Bundle> |
getBundles()
|
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,Bundle> |
getBundlesDirectly()
used by LifecycleHibernateTasks. |
protected java.io.File |
getBundlesRootDir()
|
static ICaptchaAdapter<?> |
getCaptchaAdapter()
Returns the (configured) ICaptchaAdapter. |
protected java.util.Set<Component> |
getComponentsDirectly()
used by some Lifecycle tasks. |
static int |
getDefaultPort()
returns the port to be used for standard HTTP connections. |
static org.apache.fop.apps.FopFactory |
getFopFactory()
Returns the Lifecycles' (configured) FopFactory
-instance. |
static IGeoLocationProvider |
getGeoLocationProvider()
returns the IGeoLocationProvider. |
static HibernateDataSource |
getHibernateDataSource()
Returns the HibernateDataSource. |
protected HibernateDataSourceImpl |
getHibernateDatasourceDirectly()
used by LifecycleHibernateTasks. |
static Lifecycle |
getInstance()
Deprecated. |
static javax.xml.bind.JAXBContext |
getJAXBContext()
|
static com.sun.jersey.api.json.JSONJAXBContext |
getJSONJAXBContext()
|
static java.util.Collection<java.util.Locale> |
getKnownLocales()
returns a list of all known {@link Locale}s. |
protected java.util.Collection<Locale> |
getLocalesDirectly()
used by some Lifecycle tasks. |
static MailQueue |
getMailQueue()
returns the MailQueue. |
protected MailQueue |
getMailQueueDirectly()
used by LifecycleMailQueueTasks. |
protected ServletConfig |
getPulseConfiguration()
gives internal access to the pulse configuration. |
protected java.io.File |
getPulseRootDir()
used by some Lifecycle tasks. |
static java.util.Random |
getRandom()
returns the default random source which usually is a SecureRandom
. |
static byte[] |
getSaltedHash(byte[] src)
creates a salted SHA-512 hash of the given byte array. |
static int |
getSecurePort()
returns the port to be used for secure (HTTPS) connections. |
static java.lang.String |
getVersioningPrefix()
returns the versioning prefix (see: VersionRewriteFilter). |
static Action.Security |
getWeakestCommandSecurityLevel()
returns the weakest security level Action.Security to be honoured, if
TLS is available. |
static boolean |
isTransportLayerSecurityAvailable()
indicates whether pulse is configured to use TLS. |
protected void |
setAttributeFactoryDirectly(AttributeFactory factory)
sets the initialised AttributeFactory during startup. |
protected void |
setHibernateDataSourceDirectly(HibernateDataSourceImpl ds)
used by LifecycleHibernateTasks to inject the data source. |
protected void |
setJAXBContext(javax.xml.bind.JAXBContext ctx)
sets the JAXBContext. |
protected void |
setJSONJAXBContext(com.sun.jersey.api.json.JSONJAXBContext context)
sets the JSONJAXBContext. |
protected void |
setMailQueueDirectly(MailQueue mc)
used by LifecycleMailQueueTasks to inject the mail queue. |
static void |
shutdown()
shuts the Lifecycle singleton down. |
static void |
startup(java.io.File pulseWebapp)
initialises the Lifecyle singleton. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static AttributeFactory getAttributeFactory()
AttributeFactory.
AttributeFactorypublic static java.util.Collection<Bundle> getBundles()
public static Bundle getBundle(java.lang.String name)
name - the name of the bundle
null, if no such Bundle exists.public static java.io.File getBasePath()
public static HibernateDataSource getHibernateDataSource()
HibernateDataSource.
HibernateDataSourcepublic static IGeoLocationProvider getGeoLocationProvider()
IGeoLocationProvider.
IGeoLocationProviderpublic static ICaptchaAdapter<?> getCaptchaAdapter()
ICaptchaAdapter.
public static org.apache.fop.apps.FopFactory getFopFactory()
Lifecycles' (configured) FopFactory
-instance.
Lifecycles' FopFactory-instancepublic static javax.xml.bind.JAXBContext getJAXBContext()
JAXBContextpublic static com.sun.jersey.api.json.JSONJAXBContext getJSONJAXBContext()
JSONJAXBContext#newInstance(String) with a JSON mapping
of JSONConfiguration#Notation#MAPPEDpublic static java.util.Collection<java.util.Locale> getKnownLocales()
{@link Locale}s.
{@link Locale}sgetActiveLocales()public static java.util.Collection<java.util.Locale> getActiveLocales()
{@link Locale}s.
{@link Locale}sgetKnownLocales()public static MailQueue getMailQueue()
MailQueue.
MailQueuepublic static boolean isTransportLayerSecurityAvailable()
true, if TLS is availablepublic static Action.Security getWeakestCommandSecurityLevel()
Action.Security to be honoured, if
TLS is available.
isTransportLayerSecurityAvailable()public static int getDefaultPort()
public static int getSecurePort()
public static java.lang.String getVersioningPrefix()
VersionRewriteFilter).
public static java.util.Random getRandom()
SecureRandom
.
public static byte[] getSaltedHash(byte[] src)
src - the source byte array to be hashed
public static void startup(java.io.File pulseWebapp)
pulseWebapp - the root directory of the pulse webapp@Deprecated public static Lifecycle getInstance()
public static void shutdown()
protected java.io.File getPulseRootDir()
protected java.util.Collection<Locale> getLocalesDirectly()
protected java.util.Set<Component> getComponentsDirectly()
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,Bundle> getBundlesDirectly()
LifecycleHibernateTasks.
protected HibernateDataSourceImpl getHibernateDatasourceDirectly()
LifecycleHibernateTasks.
protected void setHibernateDataSourceDirectly(HibernateDataSourceImpl ds)
LifecycleHibernateTasks to inject the data source.
ds - the data sourceprotected MailQueue getMailQueueDirectly()
LifecycleMailQueueTasks.
protected void setMailQueueDirectly(MailQueue mc)
LifecycleMailQueueTasks to inject the mail queue.
mc - the mail queueprotected ServletConfig getPulseConfiguration()
protected void setJAXBContext(javax.xml.bind.JAXBContext ctx)
ctx - the JAXBContext to set.protected void setJSONJAXBContext(com.sun.jersey.api.json.JSONJAXBContext context)
context - the JSONJAXBContext to be setprotected void setAttributeFactoryDirectly(AttributeFactory factory)
AttributeFactory during startup.
factory - the factory to be set
protected static java.util.Collection<java.util.Locale> convertLocaleList(java.util.Collection<Locale> collection,
boolean onlyActive)
org.torweg.pulse.service.request.Locale to a list of java.util.Locale.
collection - the list to be convertedonlyActive - flag indicating whether to return only active locales
Localeprotected java.io.File getBundlesRootDir()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||