1 22 package org.jboss.invocation; 23 24 import java.io.Serializable ; 25 import java.io.ObjectStreamException ; 26 27 28 36 public final class InvocationKey implements Serializable 37 { 38 39 private static final long serialVersionUID = -5117370636698417671L; 40 41 45 private static final int MAX_KEY_ID = 18; 46 47 48 private static final InvocationKey[] values = new InvocationKey[MAX_KEY_ID+1]; 49 50 53 public static final InvocationKey TRANSACTION = 54 new InvocationKey("TRANSACTION", 0); 55 56 59 public static final InvocationKey PRINCIPAL = 60 new InvocationKey("PRINCIPAL", 1); 61 62 65 public static final InvocationKey CREDENTIAL = 66 new InvocationKey("CREDENTIAL", 2); 67 68 69 public static final InvocationKey SUBJECT = new InvocationKey("SUBJECT", 14); 70 71 75 public static final InvocationKey OBJECT_NAME = 76 new InvocationKey("CONTAINER", 3); 77 78 81 public static final InvocationKey TYPE = new InvocationKey("TYPE", 4); 82 83 87 public static final InvocationKey CACHE_ID = new InvocationKey("CACHE_ID", 5); 88 89 92 public static final InvocationKey METHOD = new InvocationKey("METHOD", 6); 93 94 97 public static final InvocationKey ARGUMENTS = 98 new InvocationKey("ARGUMENTS", 7); 99 100 103 public static final InvocationKey INVOCATION_CONTEXT = 104 new InvocationKey("INVOCATION_CONTEXT", 8); 105 106 109 public static final InvocationKey ENTERPRISE_CONTEXT = 110 new InvocationKey("ENTERPRISE_CONTEXT", 9); 111 112 115 public static final InvocationKey INVOKER_PROXY_BINDING = 116 new InvocationKey("INVOKER_PROXY_BINDING", 10); 117 118 121 public static final InvocationKey INVOKER = new InvocationKey("INVOKER", 11); 122 123 126 public static final InvocationKey JNDI_NAME = 127 new InvocationKey("JNDI_NAME", 12); 128 129 132 public final static InvocationKey EJB_METADATA = 133 new InvocationKey("EJB_METADATA", 13); 134 135 136 public final static InvocationKey EJB_HOME = 137 new InvocationKey("EJB_HOME", 14); 138 139 140 public final static InvocationKey SOAP_MESSAGE_CONTEXT = 141 new InvocationKey("SOAP_MESSAGE_CONTEXT", 15); 142 143 144 public final static InvocationKey SOAP_MESSAGE = 145 new InvocationKey("SOAP_MESSAGE", 16); 146 147 148 public final static InvocationKey JACC_CONTEXT_ID = 149 new InvocationKey("JACC_CONTEXT_ID", 17); 150 151 152 private final transient String name; 153 154 private final int ordinal; 155 156 private InvocationKey(String name, int ordinal) 157 { 158 this.name = name; 159 this.ordinal = ordinal; 160 values[ordinal] = this; 161 } 162 163 public String toString() 164 { 165 return name; 166 } 167 168 Object readResolve() throws ObjectStreamException 169 { 170 return values[ordinal]; 171 } 172 } 173 | Popular Tags |