|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.AllowedOperationsAssociation
public final class AllowedOperationsAssociation
Associates the current thread with a stack of flags that indicate the callers current ejb method. According to the EJB2.1 spec not all context methods can be accessed at all times For example ctx.getPrimaryKey() should throw an IllegalStateException when called from within ejbCreate()
Field Summary | |
---|---|
static HashMap |
methodMap
|
Constructor Summary | |
---|---|
AllowedOperationsAssociation()
|
Method Summary | |
---|---|
static void |
assertAllowedIn(String ctxMethod,
int flags)
Throw an IllegalStateException if the current inMethodFlag does not match the given flags |
static int |
peekInMethodFlag()
Return the current inMethodFlag, or -1 if there is none |
static String |
peekInMethodFlagAsString()
Return the current inMethodFlag in String form, or null if there is none |
static void |
popInMethodFlag()
Reset when the instance exits an ejb method |
static void |
pushInMethodFlag(int inMethodFlag)
Set when the instance enters an ejb method, reset on exit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final HashMap methodMap
Constructor Detail |
---|
public AllowedOperationsAssociation()
Method Detail |
---|
public static void pushInMethodFlag(int inMethodFlag)
inMethodFlag
- one of the IN_METHOD contants or nullpublic static void popInMethodFlag()
public static int peekInMethodFlag()
public static String peekInMethodFlagAsString()
public static void assertAllowedIn(String ctxMethod, int flags)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |