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, wait
addLockedKey, clearLockedKeys, getLockedKeys, getLockOwner, isInTxScope, isOriginLocal
clearLookedUpEntries, getLookedUpEntries, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry
protected 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 FlagContainer
public Set<Flag> getFlags()
getFlags
in interface FlagContainer
public void setFlags(Flag... flags)
setFlags
in interface FlagContainer
public void setFlags(Collection<Flag> flags)
setFlags
in interface FlagContainer
public Address getOrigin()
InvocationContext
getOrigin
in interface InvocationContext
public void setOrigin(Address origin)
public void reset()
reset
in interface FlagContainer
public boolean isFlagsUninitialized()
public boolean hasLockedKey(Object key)
InvocationContext
hasLockedKey
in interface InvocationContext
key
- lock to testpublic boolean isUseFutureReturnType()
InvocationContext
Future
as return type.isUseFutureReturnType
in interface InvocationContext
Future
as return type, false otherwisepublic void setUseFutureReturnType(boolean useFutureReturnType)
InvocationContext
Future
as return type.setUseFutureReturnType
in interface InvocationContext
useFutureReturnType
- boolean indicating whether a Future
will be needed.public AbstractInvocationContext clone()
InvocationContext
clone
in interface InvocationContext
clone
in class Object
public ClassLoader getClassLoader()
InvocationContext
getClassLoader
in interface InvocationContext
public void setClassLoader(ClassLoader classLoader)
InvocationContext
setClassLoader
in interface InvocationContext
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.