public abstract class AbstractInvocationContext extends Object implements InvocationContext
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractInvocationContext.ContextFlag |
| Modifier and Type | Field and Description |
|---|---|
protected byte |
contextFlags |
protected EnumSet<Flag> |
flags |
| Constructor and Description |
|---|
AbstractInvocationContext() |
| Modifier and Type | Method and Description |
|---|---|
AbstractInvocationContext |
clone()
Clones the invocation context.
|
ClassLoader |
getClassLoader()
Returns the class loader associated with this invocation
|
Set<Flag> |
getFlags() |
Address |
getOrigin()
Get the origin of the command, or null if the command originated locally
|
boolean |
hasFlag(Flag o) |
boolean |
hasLockedKey(Object key)
Returns true if the lock being tested is already held in the current scope, false otherwise.
|
protected boolean |
isContextFlagSet(AbstractInvocationContext.ContextFlag flag)
Tests whether a context flag is set.
|
boolean |
isFlagsUninitialized() |
boolean |
isUseFutureReturnType()
Indicates whether the call requires a
Future
as return type. |
void |
reset() |
void |
setClassLoader(ClassLoader classLoader)
Sets the class loader associated for this invocation
|
protected void |
setContextFlag(AbstractInvocationContext.ContextFlag flag)
Utility method that sets a given context flag.
|
protected void |
setContextFlag(AbstractInvocationContext.ContextFlag flag,
boolean set)
Utility value that sets or un-sets a context flag based on a boolean passed in
|
void |
setFlags(Collection<Flag> flags) |
void |
setFlags(Flag... flags) |
void |
setOrigin(Address origin) |
void |
setUseFutureReturnType(boolean useFutureReturnType)
Sets whether the call requires a
Future
as return type. |
String |
toString() |
protected void |
unsetContextFlag(AbstractInvocationContext.ContextFlag flag)
Utility method that un-sets a context flag.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddLockedKey, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, isOriginLocalclearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntryprotected final boolean isContextFlagSet(AbstractInvocationContext.ContextFlag flag)
flag - context flag to testprotected final void setContextFlag(AbstractInvocationContext.ContextFlag flag)
flag - context flag to setprotected final void unsetContextFlag(AbstractInvocationContext.ContextFlag flag)
flag - context flag to unsetprotected final void setContextFlag(AbstractInvocationContext.ContextFlag flag, boolean set)
flag - flag to set or unsetset - if true, the context flag is set. If false, the context flag is unset.public boolean hasFlag(Flag o)
hasFlag in interface FlagContainerpublic Set<Flag> getFlags()
getFlags in interface FlagContainerpublic void setFlags(Flag... flags)
setFlags in interface FlagContainerpublic void setFlags(Collection<Flag> flags)
setFlags in interface FlagContainerpublic Address getOrigin()
InvocationContextgetOrigin in interface InvocationContextpublic void setOrigin(Address origin)
public void reset()
reset in interface FlagContainerpublic boolean isFlagsUninitialized()
public boolean hasLockedKey(Object key)
InvocationContexthasLockedKey in interface InvocationContextkey - lock to testpublic boolean isUseFutureReturnType()
InvocationContextFuture
as return type.isUseFutureReturnType in interface InvocationContextFuture
as return type, false otherwisepublic void setUseFutureReturnType(boolean useFutureReturnType)
InvocationContextFuture
as return type.setUseFutureReturnType in interface InvocationContextuseFutureReturnType - boolean indicating whether a Future
will be needed.public AbstractInvocationContext clone()
InvocationContextclone in interface InvocationContextclone in class Objectpublic ClassLoader getClassLoader()
InvocationContextgetClassLoader in interface InvocationContextpublic void setClassLoader(ClassLoader classLoader)
InvocationContextsetClassLoader in interface InvocationContextCopyright © 2012 JBoss by Red Hat. All Rights Reserved.