org.apache.tapestry5.ioc.services
Interface PerThreadValue<T>


public interface PerThreadValue<T>

A wrapper around PerthreadManager.get(Object) and PerthreadManager.put(Object, Object).

Since:
5.2.0

Method Summary
 boolean exists()
          Is a value stored (even null)?
 T get()
          Reads the current per-thread value, or returns null if no value has been stored.
 T get(T defaultValue)
          Gets the current per-thread value if it exists (even if null), or the defaultValue if no value has been stored.
 T set(T newValue)
          Sets the current per-thread value, then returns that value.
 

Method Detail

exists

boolean exists()
Is a value stored (even null)?


get

T get()
Reads the current per-thread value, or returns null if no value has been stored.


get

T get(T defaultValue)
Gets the current per-thread value if it exists (even if null), or the defaultValue if no value has been stored.


set

T set(T newValue)
Sets the current per-thread value, then returns that value.



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