net.sourceforge.guacamole.net.basic.event
Class SessionListenerCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by net.sourceforge.guacamole.net.basic.event.SessionListenerCollection
All Implemented Interfaces:
Iterable, Collection

public class SessionListenerCollection
extends AbstractCollection

A collection which iterates over instances of all listeners defined in guacamole.properties. For each listener defined in guacamole.properties, a new instance is created and stored in this collection. The contents of this collection is stored within the HttpSession, and will be reused if available. Each listener is instantiated once per session. Listeners are singleton classes within the session, but not globally.

Author:
Michael Jumper

Constructor Summary
SessionListenerCollection(javax.servlet.http.HttpSession session)
          Creates a new SessionListenerCollection which stores all listeners defined in guacamole.properties in the provided session.
 
Method Summary
 Iterator iterator()
           
 int size()
           
 
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
equals, hashCode
 

Constructor Detail

SessionListenerCollection

public SessionListenerCollection(javax.servlet.http.HttpSession session)
                          throws net.sourceforge.guacamole.GuacamoleException
Creates a new SessionListenerCollection which stores all listeners defined in guacamole.properties in the provided session. If listeners are already stored in the provided session, those listeners are used instead.

Parameters:
session - The HttpSession to store listeners within.
Throws:
net.sourceforge.guacamole.GuacamoleException - If an error occurs while instantiating new listeners.
Method Detail

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in class AbstractCollection

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in class AbstractCollection


Copyright © 2013. All Rights Reserved.