1. package org.omg.PortableServer;
  2. /**
  3. * org/omg/PortableServer/ServantRetentionPolicyValue.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.2"
  5. * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
  6. * Wednesday, September 15, 2004 10:28:40 AM GMT
  7. */
  8. /**
  9. * ServantRetentionPolicyValue can have the following
  10. * values. RETAIN - to indicate that the POA will retain
  11. * active servants in its Active Object Map.
  12. * NON_RETAIN - to indicate Servants are not retained by
  13. * the POA. If no ServantRetentionPolicy is specified at
  14. * POA creation, the default is RETAIN.
  15. */
  16. public class ServantRetentionPolicyValue implements org.omg.CORBA.portable.IDLEntity
  17. {
  18. private int __value;
  19. private static int __size = 2;
  20. private static org.omg.PortableServer.ServantRetentionPolicyValue[] __array = new org.omg.PortableServer.ServantRetentionPolicyValue [__size];
  21. public static final int _RETAIN = 0;
  22. public static final org.omg.PortableServer.ServantRetentionPolicyValue RETAIN = new org.omg.PortableServer.ServantRetentionPolicyValue(_RETAIN);
  23. public static final int _NON_RETAIN = 1;
  24. public static final org.omg.PortableServer.ServantRetentionPolicyValue NON_RETAIN = new org.omg.PortableServer.ServantRetentionPolicyValue(_NON_RETAIN);
  25. public int value ()
  26. {
  27. return __value;
  28. }
  29. public static org.omg.PortableServer.ServantRetentionPolicyValue from_int (int value)
  30. {
  31. if (value >= 0 && value < __size)
  32. return __array[value];
  33. else
  34. throw new org.omg.CORBA.BAD_PARAM ();
  35. }
  36. protected ServantRetentionPolicyValue (int value)
  37. {
  38. __value = value;
  39. __array[__value] = this;
  40. }
  41. } // class ServantRetentionPolicyValue