org.codehaus.wadi.impl
Class DistributableAttributes

java.lang.Object
  extended byorg.codehaus.wadi.impl.StandardAttributes
      extended byorg.codehaus.wadi.impl.DistributableAttributes
All Implemented Interfaces:
Attributes, Config, DistributableValueConfig, SerializableContent, ValueConfig
Direct Known Subclasses:
LazyAttributes

public class DistributableAttributes
extends StandardAttributes
implements SerializableContent, DistributableValueConfig

A DistributableAttributes object needs to be Listener aware. When a Session is invalidated in Serialised state, we only want to deserialise the Attributes that we absolutely have to - in other words, those expecting some kind of notification (activation or unbinding). If the Context has HttpSessionAttributeListeners registered, then we will have to explicitly remove every attribute from every session anyway, so there is no need to keep a separate tally.

Version:
$Revision: 1139 $
Author:
Jules Gosnell

Field Summary
protected  Set _listenerNames
           
 
Fields inherited from class org.codehaus.wadi.impl.StandardAttributes
_config, _map
 
Constructor Summary
DistributableAttributes(AttributesConfig config, Map map)
           
 
Method Summary
 ValueHelper findHelper(Class type)
           
 boolean getHttpSessionAttributeListenersRegistered()
           
 HttpSessionEvent getHttpSessionEvent()
           
 Set getListenerNames()
           
 Streamer getStreamer()
           
protected  boolean isListener(Object o)
           
 Object put(Object key, Object newValue)
           
 void readContent(ObjectInput oi)
           
 Object remove(Object key)
           
 void writeContent(ObjectOutput oo)
           
 
Methods inherited from class org.codehaus.wadi.impl.StandardAttributes
clear, get, keySet, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_listenerNames

protected Set _listenerNames
Constructor Detail

DistributableAttributes

public DistributableAttributes(AttributesConfig config,
                               Map map)
Method Detail

getListenerNames

public Set getListenerNames()

remove

public Object remove(Object key)
Specified by:
remove in interface Attributes
Overrides:
remove in class StandardAttributes

put

public Object put(Object key,
                  Object newValue)
Specified by:
put in interface Attributes
Overrides:
put in class StandardAttributes

isListener

protected boolean isListener(Object o)

readContent

public void readContent(ObjectInput oi)
                 throws IOException,
                        ClassNotFoundException
Specified by:
readContent in interface SerializableContent
Throws:
IOException
ClassNotFoundException

writeContent

public void writeContent(ObjectOutput oo)
                  throws IOException
Specified by:
writeContent in interface SerializableContent
Throws:
IOException

findHelper

public ValueHelper findHelper(Class type)
Specified by:
findHelper in interface DistributableValueConfig

getHttpSessionAttributeListenersRegistered

public boolean getHttpSessionAttributeListenersRegistered()
Specified by:
getHttpSessionAttributeListenersRegistered in interface DistributableValueConfig

getHttpSessionEvent

public HttpSessionEvent getHttpSessionEvent()
Specified by:
getHttpSessionEvent in interface DistributableValueConfig

getStreamer

public Streamer getStreamer()
Specified by:
getStreamer in interface DistributableValueConfig


Copyright © 2004-2006 Core Developers Network Ltd.. All Rights Reserved.