RichFaces Showcase 4.1.1-SNAPSHOT

org.richfaces.demo.push
Class AbstractCapabilityInitializer

java.lang.Object
  extended by org.richfaces.demo.push.AbstractCapabilityInitializer
All Implemented Interfaces:
EventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListener, javax.servlet.ServletContextListener, CapabilityInitializer
Direct Known Subclasses:
AbstractMessageProducerInitializer, JMSInitializer, TopicsInitializer

public abstract class AbstractCapabilityInitializer
extends Object
implements CapabilityInitializer, javax.faces.event.SystemEventListener, javax.servlet.ServletContextListener

Abstract initializater and finalizer listening for JSF PostConstructApplicationEvent (needs to be registered explicitly in faces-config.xml).

After observing PostConstructApplicationEvent, it registers to PreDestroyApplicationEvent to observe finalization phase.

Author:
Lukas Fryc

Constructor Summary
AbstractCapabilityInitializer()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
 void finalizeCapability()
          Finalizes provided capability and frees allocated resources.
 boolean isCapabilityEnabled()
          Returns true when capability should be initialized.
protected  boolean isCorrentlyInitialized()
          Returns true if initialization method has been processed without errors.
 boolean isListenerForSource(Object source)
           
 void processEvent(javax.faces.event.SystemEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.richfaces.demo.push.CapabilityInitializer
initializeCapability
 

Constructor Detail

AbstractCapabilityInitializer

public AbstractCapabilityInitializer()
Method Detail

processEvent

public void processEvent(javax.faces.event.SystemEvent event)
                  throws javax.faces.event.AbortProcessingException
Specified by:
processEvent in interface javax.faces.event.SystemEventListener
Throws:
javax.faces.event.AbortProcessingException

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent sce)
Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent sce)
Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener

isCorrentlyInitialized

protected boolean isCorrentlyInitialized()
Returns true if initialization method has been processed without errors.

Returns:
true if initialization method has been processed without errors.

isListenerForSource

public boolean isListenerForSource(Object source)
Specified by:
isListenerForSource in interface javax.faces.event.SystemEventListener

finalizeCapability

public void finalizeCapability()
                        throws Exception
Description copied from interface: CapabilityInitializer
Finalizes provided capability and frees allocated resources.

Specified by:
finalizeCapability in interface CapabilityInitializer
Throws:
Exception

isCapabilityEnabled

public boolean isCapabilityEnabled()
Description copied from interface: CapabilityInitializer
Returns true when capability should be initialized.

Specified by:
isCapabilityEnabled in interface CapabilityInitializer
Returns:
true when capability should be initialized.

RichFaces Showcase 4.1.1-SNAPSHOT

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.