org.openscience.nmrshiftdb.util
Class VectorWithSessionBinding

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList
              extended by org.openscience.nmrshiftdb.util.VectorWithSessionBinding
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.EventListener, java.util.List, java.util.RandomAccess, javax.servlet.http.HttpSessionBindingListener

public class VectorWithSessionBinding
extends java.util.ArrayList
implements javax.servlet.http.HttpSessionBindingListener

This is a vector which writes itself to the db when unbound from session

Author:
shk3
See Also:
Serialized Form

Field Summary
private  java.lang.String username
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
VectorWithSessionBinding(java.lang.String username)
          Constructor for the VectorWithSessionBinding object
 
Method Summary
 void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
          Takes care of session tracking
 void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
          This writes this object serialized with jsx to a field in the TURBINE_USER table which has the name under which this object is bound to the session
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

username

private java.lang.String username
Constructor Detail

VectorWithSessionBinding

public VectorWithSessionBinding(java.lang.String username)
Constructor for the VectorWithSessionBinding object

Parameters:
username - It might be the user is already unbound from session when this object is unbound, so we remember the user.
Method Detail

valueUnbound

public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
This writes this object serialized with jsx to a field in the TURBINE_USER table which has the name under which this object is bound to the session

Specified by:
valueUnbound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
event - HttpSessionBindingEvent

valueBound

public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
Takes care of session tracking

Specified by:
valueBound in interface javax.servlet.http.HttpSessionBindingListener
Parameters:
event - HttpSessionBindingEvent