org.jboss.ejb.client
Class ThreadLocalContextSelector<T>
java.lang.Object
   org.jboss.ejb.client.ThreadLocalContextSelector<T>
org.jboss.ejb.client.ThreadLocalContextSelector<T>
- Type Parameters:
- T- the context type
- All Implemented Interfaces: 
- ContextSelector<T>
- public final class ThreadLocalContextSelector<T> 
- extends Object- implements ContextSelector<T>
A context selector which uses thread-local storage.
- Author:
- David M. Lloyd
 
| Method Summary | 
|  T | getCurrent()Get the current instance, returning
 nullif none are valid in the current context. | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
ThreadLocalContextSelector
public ThreadLocalContextSelector(ThreadLocal<T> storage)
- Construct a new instance.
 
- Parameters:
- storage- the thread-local from which the value should be selected
 
getCurrent
public T getCurrent()
- Description copied from interface: ContextSelector
- Get the current instance, returning nullif none are valid in the current context.
 
- 
- Specified by:
- getCurrentin interface- ContextSelector<T>
 
- 
- Returns:
- the instance, or nullif there is none
 
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.