1. package org.omg.PortableServer;
  2. /**
  3. * org/omg/PortableServer/LifespanPolicyValue.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. * The LifespanPolicyValue can have the following values.
  10. * TRANSIENT - The objects implemented in the POA
  11. * cannot outlive the POA instance in which they are
  12. * first created.
  13. * PERSISTENT - The objects implemented in the POA can
  14. * outlive the process in which they are first created.
  15. */
  16. public class LifespanPolicyValue implements org.omg.CORBA.portable.IDLEntity
  17. {
  18. private int __value;
  19. private static int __size = 2;
  20. private static org.omg.PortableServer.LifespanPolicyValue[] __array = new org.omg.PortableServer.LifespanPolicyValue [__size];
  21. public static final int _TRANSIENT = 0;
  22. public static final org.omg.PortableServer.LifespanPolicyValue TRANSIENT = new org.omg.PortableServer.LifespanPolicyValue(_TRANSIENT);
  23. public static final int _PERSISTENT = 1;
  24. public static final org.omg.PortableServer.LifespanPolicyValue PERSISTENT = new org.omg.PortableServer.LifespanPolicyValue(_PERSISTENT);
  25. public int value ()
  26. {
  27. return __value;
  28. }
  29. public static org.omg.PortableServer.LifespanPolicyValue 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 LifespanPolicyValue (int value)
  37. {
  38. __value = value;
  39. __array[__value] = this;
  40. }
  41. } // class LifespanPolicyValue