org.apache.openejb.core
Class ThreadContext

java.lang.Object
  extended by org.apache.openejb.core.ThreadContext

public class ThreadContext
extends Object


Constructor Summary
ThreadContext(BeanContext beanContext, Object primaryKey)
           
ThreadContext(BeanContext beanContext, Object primaryKey, Operation operation)
           
ThreadContext(ThreadContext that)
           
 
Method Summary
static void addThreadContextListener(ThreadContextListener listener)
           
static ThreadContext enter(ThreadContext newContext)
           
static void exit(ThreadContext oldContext)
           
<T> T
get(Class<T> type)
           
 BeanContext getBeanContext()
           
 BaseContext.State[] getCurrentAllowedStates()
           
 Operation getCurrentOperation()
           
 Class getInvokedInterface()
           
 Object getPrimaryKey()
           
static ThreadContext getThreadContext()
           
 TransactionPolicy getTransactionPolicy()
           
static void initAsynchronousCancelled(AtomicBoolean initializeValue)
           
static boolean isAsynchronousCancelled()
           
 boolean isDiscardInstance()
           
<T> T
remove(Class<T> type)
           
static void removeAsynchronousCancelled()
           
static void removeThreadContextListener(ThreadContextListener listener)
           
<T> T
set(Class<T> type, T value)
           
 BaseContext.State[] setCurrentAllowedStates(BaseContext.State[] newAllowedStates)
           
 void setCurrentOperation(Operation operation)
           
 void setDiscardInstance(boolean discardInstance)
           
 void setInvokedInterface(Class invokedInterface)
           
 void setTransactionPolicy(TransactionPolicy transactionPolicy)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadContext

public ThreadContext(BeanContext beanContext,
                     Object primaryKey)

ThreadContext

public ThreadContext(BeanContext beanContext,
                     Object primaryKey,
                     Operation operation)

ThreadContext

public ThreadContext(ThreadContext that)
Method Detail

getThreadContext

public static ThreadContext getThreadContext()

enter

public static ThreadContext enter(ThreadContext newContext)

exit

public static void exit(ThreadContext oldContext)

initAsynchronousCancelled

public static void initAsynchronousCancelled(AtomicBoolean initializeValue)

isAsynchronousCancelled

public static boolean isAsynchronousCancelled()

removeAsynchronousCancelled

public static void removeAsynchronousCancelled()

addThreadContextListener

public static void addThreadContextListener(ThreadContextListener listener)

removeThreadContextListener

public static void removeThreadContextListener(ThreadContextListener listener)

getBeanContext

public BeanContext getBeanContext()

getPrimaryKey

public Object getPrimaryKey()

getCurrentOperation

public Operation getCurrentOperation()

setCurrentOperation

public void setCurrentOperation(Operation operation)

getInvokedInterface

public Class getInvokedInterface()

setInvokedInterface

public void setInvokedInterface(Class invokedInterface)

getTransactionPolicy

public TransactionPolicy getTransactionPolicy()

setTransactionPolicy

public void setTransactionPolicy(TransactionPolicy transactionPolicy)

getCurrentAllowedStates

public BaseContext.State[] getCurrentAllowedStates()

setCurrentAllowedStates

public BaseContext.State[] setCurrentAllowedStates(BaseContext.State[] newAllowedStates)

get

public <T> T get(Class<T> type)

set

public <T> T set(Class<T> type,
                 T value)

remove

public <T> T remove(Class<T> type)

isDiscardInstance

public boolean isDiscardInstance()

setDiscardInstance

public void setDiscardInstance(boolean discardInstance)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2013 The Apache Software Foundation. All Rights Reserved.