org.ops4j.pax.web.samples.helloworld.wc.internal
Class HelloWorldSessionListener

java.lang.Object
  extended by org.ops4j.pax.web.samples.helloworld.wc.internal.HelloWorldSessionListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.http.HttpSessionListener

public class HelloWorldSessionListener
extends java.lang.Object
implements javax.servlet.http.HttpSessionListener

User Session Listener.

Author:
Anaximandro de Godinho (Woody)

Constructor Summary
HelloWorldSessionListener()
           
 
Method Summary
static java.util.List<java.lang.Object> getAttributes(java.lang.String name)
          Return a list with all session values for a given attribute name.
static int getCounter()
          Return the current session counter.
 void sessionCreated(javax.servlet.http.HttpSessionEvent event)
          Fires whenever a new session is created.
 void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
          Fires whenever a session is destroyed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelloWorldSessionListener

public HelloWorldSessionListener()
Method Detail

sessionCreated

public void sessionCreated(javax.servlet.http.HttpSessionEvent event)
Fires whenever a new session is created.

Specified by:
sessionCreated in interface javax.servlet.http.HttpSessionListener

sessionDestroyed

public void sessionDestroyed(javax.servlet.http.HttpSessionEvent event)
Fires whenever a session is destroyed.

Specified by:
sessionDestroyed in interface javax.servlet.http.HttpSessionListener

getAttributes

public static java.util.List<java.lang.Object> getAttributes(java.lang.String name)
Return a list with all session values for a given attribute name.

Returns:
a list with all session values for a given attribute name.

getCounter

public static int getCounter()
Return the current session counter.

Returns:
the current session counter.


Copyright © 2006-2011 OPS4J - Open Participation Software for Java. All Rights Reserved.