org.apache.tapestry5.ioc.internal.services
Class PerthreadManagerImpl

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.services.PerthreadManagerImpl
All Implemented Interfaces:
PerthreadManager

public class PerthreadManagerImpl
extends Object
implements PerthreadManager


Constructor Summary
PerthreadManagerImpl(org.slf4j.Logger logger)
           
 
Method Summary
 void addThreadCleanupListener(ThreadCleanupListener listener)
          Adds a listener to the hub.
 void cleanup()
          Instructs the hub to notify all its listeners (for the current thread).
 Object get(Object key)
          Returns an object stored in the per-thread map.
 void put(Object key, Object value)
          Stores a value into the per-thread map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PerthreadManagerImpl

public PerthreadManagerImpl(org.slf4j.Logger logger)
Method Detail

addThreadCleanupListener

public void addThreadCleanupListener(ThreadCleanupListener listener)
Description copied from interface: PerthreadManager
Adds a listener to the hub. All listeners are discarded at the PerthreadManager.cleanup().

Specified by:
addThreadCleanupListener in interface PerthreadManager
Parameters:
listener - to add

cleanup

public void cleanup()
Instructs the hub to notify all its listeners (for the current thread). It also discards its list of listeners.

Specified by:
cleanup in interface PerthreadManager

put

public void put(Object key,
                Object value)
Description copied from interface: PerthreadManager
Stores a value into the per-thread map.

Specified by:
put in interface PerthreadManager

get

public Object get(Object key)
Description copied from interface: PerthreadManager
Returns an object stored in the per-thread map. When the object is a string, the expected name is service id.subkey. Unlike most of Tapestry, such keys will be case sensitive.

Specified by:
get in interface PerthreadManager
Parameters:
key - key used to retrieve object
Returns:
corresponding per-thread object, or null


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.