001 package org.omg.Security;
002 /**
003 * Generated from IDL enum "InvocationCredentialsType".
004 *
005 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
006 * @version generated at Sep 6, 2011 5:12:29 AM
007 */
008
009 public final class InvocationCredentialsType
010 implements org.omg.CORBA.portable.IDLEntity
011 {
012 private int value = -1;
013 public static final int _SecOwnCredentials = 0;
014 public static final InvocationCredentialsType SecOwnCredentials = new InvocationCredentialsType(_SecOwnCredentials);
015 public static final int _SecReceivedCredentials = 1;
016 public static final InvocationCredentialsType SecReceivedCredentials = new InvocationCredentialsType(_SecReceivedCredentials);
017 public static final int _SecTargetCredentials = 2;
018 public static final InvocationCredentialsType SecTargetCredentials = new InvocationCredentialsType(_SecTargetCredentials);
019 public int value()
020 {
021 return value;
022 }
023 public static InvocationCredentialsType from_int(int value)
024 {
025 switch (value) {
026 case _SecOwnCredentials: return SecOwnCredentials;
027 case _SecReceivedCredentials: return SecReceivedCredentials;
028 case _SecTargetCredentials: return SecTargetCredentials;
029 default: throw new org.omg.CORBA.BAD_PARAM();
030 }
031 }
032 public String toString()
033 {
034 switch (value) {
035 case _SecOwnCredentials: return "SecOwnCredentials";
036 case _SecReceivedCredentials: return "SecReceivedCredentials";
037 case _SecTargetCredentials: return "SecTargetCredentials";
038 default: throw new org.omg.CORBA.BAD_PARAM();
039 }
040 }
041 protected InvocationCredentialsType(int i)
042 {
043 value = i;
044 }
045 java.lang.Object readResolve()
046 throws java.io.ObjectStreamException
047 {
048 return from_int(value());
049 }
050 }