package org.jboss.invocation;
import java.io.Serializable;
import java.io.ObjectStreamException;
public final class InvocationKey implements Serializable
{
private static final long serialVersionUID = -5117370636698417671L;
private static final int MAX_KEY_ID = 18;
private static final InvocationKey[] values = new InvocationKey[MAX_KEY_ID+1];
public static final InvocationKey TRANSACTION =
new InvocationKey("TRANSACTION", 0);
public static final InvocationKey PRINCIPAL =
new InvocationKey("PRINCIPAL", 1);
public static final InvocationKey CREDENTIAL =
new InvocationKey("CREDENTIAL", 2);
public static final InvocationKey SUBJECT = new InvocationKey("SUBJECT", 14);
public static final InvocationKey OBJECT_NAME =
new InvocationKey("CONTAINER", 3);
public static final InvocationKey TYPE = new InvocationKey("TYPE", 4);
public static final InvocationKey CACHE_ID = new InvocationKey("CACHE_ID", 5);
public static final InvocationKey METHOD = new InvocationKey("METHOD", 6);
public static final InvocationKey ARGUMENTS =
new InvocationKey("ARGUMENTS", 7);
public static final InvocationKey INVOCATION_CONTEXT =
new InvocationKey("INVOCATION_CONTEXT", 8);
public static final InvocationKey ENTERPRISE_CONTEXT =
new InvocationKey("ENTERPRISE_CONTEXT", 9);
public static final InvocationKey INVOKER_PROXY_BINDING =
new InvocationKey("INVOKER_PROXY_BINDING", 10);
public static final InvocationKey INVOKER = new InvocationKey("INVOKER", 11);
public static final InvocationKey JNDI_NAME =
new InvocationKey("JNDI_NAME", 12);
public final static InvocationKey EJB_METADATA =
new InvocationKey("EJB_METADATA", 13);
public final static InvocationKey EJB_HOME =
new InvocationKey("EJB_HOME", 14);
public final static InvocationKey SOAP_MESSAGE_CONTEXT =
new InvocationKey("SOAP_MESSAGE_CONTEXT", 15);
public final static InvocationKey SOAP_MESSAGE =
new InvocationKey("SOAP_MESSAGE", 16);
public final static InvocationKey JACC_CONTEXT_ID =
new InvocationKey("JACC_CONTEXT_ID", 17);
private final transient String name;
private final int ordinal;
private InvocationKey(String name, int ordinal)
{
this.name = name;
this.ordinal = ordinal;
values[ordinal] = this;
}
public String toString()
{
return name;
}
Object readResolve() throws ObjectStreamException
{
return values[ordinal];
}
}