org.apache.myfaces.test.mock
Class MockWebContainer

java.lang.Object
  extended by org.apache.myfaces.test.mock.MockWebContainer
All Implemented Interfaces:
EventListener, javax.servlet.http.HttpSessionAttributeListener, javax.servlet.http.HttpSessionListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletContextListener, javax.servlet.ServletRequestAttributeListener, javax.servlet.ServletRequestListener

public class MockWebContainer
extends Object
implements javax.servlet.ServletContextListener, javax.servlet.ServletContextAttributeListener, javax.servlet.ServletRequestListener, javax.servlet.ServletRequestAttributeListener, javax.servlet.http.HttpSessionListener, javax.servlet.http.HttpSessionAttributeListener


Constructor Summary
MockWebContainer()
           
 
Method Summary
 void attributeAdded(javax.servlet.http.HttpSessionBindingEvent se)
           
 void attributeAdded(javax.servlet.ServletContextAttributeEvent scab)
           
 void attributeAdded(javax.servlet.ServletRequestAttributeEvent srae)
           
 void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent se)
           
 void attributeRemoved(javax.servlet.ServletContextAttributeEvent scab)
           
 void attributeRemoved(javax.servlet.ServletRequestAttributeEvent srae)
           
 void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent se)
           
 void attributeReplaced(javax.servlet.ServletContextAttributeEvent scab)
           
 void attributeReplaced(javax.servlet.ServletRequestAttributeEvent srae)
           
 void contextDestroyed(javax.servlet.ServletContextEvent sce)
           
 void contextInitialized(javax.servlet.ServletContextEvent sce)
           
 void requestDestroyed(javax.servlet.ServletRequestEvent sre)
           
 void requestInitialized(javax.servlet.ServletRequestEvent sre)
           
 void sessionCreated(javax.servlet.http.HttpSessionEvent se)
           
 void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
           
 void subscribeListener(Object listener)
          Subscribe a servlet listener
 void subscribeListener(String listenerClassName)
          Create an instance of the passes class and subscribe it as as servlet listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockWebContainer

public MockWebContainer()
Method Detail

subscribeListener

public void subscribeListener(String listenerClassName)
                       throws ClassNotFoundException,
                              InstantiationException,
                              IllegalAccessException
Create an instance of the passes class and subscribe it as as servlet listener

Parameters:
listenerClassName -
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException

subscribeListener

public void subscribeListener(Object listener)
Subscribe a servlet listener

Parameters:
listener -

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

attributeAdded

public void attributeAdded(javax.servlet.ServletContextAttributeEvent scab)
Specified by:
attributeAdded in interface javax.servlet.ServletContextAttributeListener

attributeRemoved

public void attributeRemoved(javax.servlet.ServletContextAttributeEvent scab)
Specified by:
attributeRemoved in interface javax.servlet.ServletContextAttributeListener

attributeReplaced

public void attributeReplaced(javax.servlet.ServletContextAttributeEvent scab)
Specified by:
attributeReplaced in interface javax.servlet.ServletContextAttributeListener

requestInitialized

public void requestInitialized(javax.servlet.ServletRequestEvent sre)
Specified by:
requestInitialized in interface javax.servlet.ServletRequestListener

requestDestroyed

public void requestDestroyed(javax.servlet.ServletRequestEvent sre)
Specified by:
requestDestroyed in interface javax.servlet.ServletRequestListener

sessionCreated

public void sessionCreated(javax.servlet.http.HttpSessionEvent se)
Specified by:
sessionCreated in interface javax.servlet.http.HttpSessionListener

sessionDestroyed

public void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
Specified by:
sessionDestroyed in interface javax.servlet.http.HttpSessionListener

attributeAdded

public void attributeAdded(javax.servlet.ServletRequestAttributeEvent srae)
Specified by:
attributeAdded in interface javax.servlet.ServletRequestAttributeListener

attributeRemoved

public void attributeRemoved(javax.servlet.ServletRequestAttributeEvent srae)
Specified by:
attributeRemoved in interface javax.servlet.ServletRequestAttributeListener

attributeReplaced

public void attributeReplaced(javax.servlet.ServletRequestAttributeEvent srae)
Specified by:
attributeReplaced in interface javax.servlet.ServletRequestAttributeListener

attributeAdded

public void attributeAdded(javax.servlet.http.HttpSessionBindingEvent se)
Specified by:
attributeAdded in interface javax.servlet.http.HttpSessionAttributeListener

attributeRemoved

public void attributeRemoved(javax.servlet.http.HttpSessionBindingEvent se)
Specified by:
attributeRemoved in interface javax.servlet.http.HttpSessionAttributeListener

attributeReplaced

public void attributeReplaced(javax.servlet.http.HttpSessionBindingEvent se)
Specified by:
attributeReplaced in interface javax.servlet.http.HttpSessionAttributeListener


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.