KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb > AllowedOperationsFlags


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.ejb;
23
24 // $Id: AllowedOperationsFlags.java 40312 2006-01-18 12:13:46Z dimitris $
25

26 /**
27  * Constants used by the AllowedOperationsAssociation
28  *
29  * According to the EJB2.1 spec not all context methods can be accessed at all times
30  * For example ctx.getPrimaryKey() should throw an IllegalStateException when called from within ejbCreate()
31  *
32  * @author Thomas.Diesler@jboss.org
33  * @version $Revision: 40312 $
34  */

35 public interface AllowedOperationsFlags
36 {
37    // Constants -----------------------------------------------------
38

39    /**
40     * These constants are used to validate method access
41     */

42    public static final int NOT_ALLOWED = 0;
43    public static final int IN_INTERCEPTOR_METHOD = (int) Math.pow(2, 0);
44    public static final int IN_EJB_ACTIVATE = (int) Math.pow(2, 1);
45    public static final int IN_EJB_PASSIVATE = (int) Math.pow(2, 2);
46    public static final int IN_EJB_REMOVE = (int) Math.pow(2, 3);
47    public static final int IN_EJB_CREATE = (int) Math.pow(2, 4);
48    public static final int IN_EJB_POST_CREATE = (int) Math.pow(2, 5);
49    public static final int IN_EJB_FIND = (int) Math.pow(2, 6);
50    public static final int IN_EJB_HOME = (int) Math.pow(2, 7);
51    public static final int IN_EJB_TIMEOUT = (int) Math.pow(2, 8);
52    public static final int IN_EJB_LOAD = (int) Math.pow(2, 9);
53    public static final int IN_EJB_STORE = (int) Math.pow(2, 10);
54    public static final int IN_SET_ENTITY_CONTEXT = (int) Math.pow(2, 11);
55    public static final int IN_UNSET_ENTITY_CONTEXT = (int) Math.pow(2, 12);
56    public static final int IN_SET_SESSION_CONTEXT = (int) Math.pow(2, 13);
57    public static final int IN_SET_MESSAGE_DRIVEN_CONTEXT = (int) Math.pow(2, 14);
58    public static final int IN_AFTER_BEGIN = (int) Math.pow(2, 15);
59    public static final int IN_BEFORE_COMPLETION = (int) Math.pow(2, 16);
60    public static final int IN_AFTER_COMPLETION = (int) Math.pow(2, 17);
61    public static final int IN_BUSINESS_METHOD = (int) Math.pow(2, 18);
62    public static final int IN_SERVICE_ENDPOINT_METHOD = (int) Math.pow(2, 19);
63 }
64
Popular Tags