1. package org.omg.PortableServer;
  2. /**
  3. * org/omg/PortableServer/ThreadPolicyValue.java .
  4. * Generated by the IDL-to-Java compiler (portable), version "3.1"
  5. * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
  6. * Monday, February 23, 2004 7:03:01 AM GMT
  7. */
  8. /**
  9. * The ThreadPolicyValue can have the following values.
  10. * ORB_CTRL_MODEL - The ORB is responsible for assigning
  11. * requests for an ORB- controlled POA to threads.
  12. * SINGLE_THREAD_MODEL - Requests for a single-threaded
  13. * POA are processed sequentially.
  14. */
  15. public class ThreadPolicyValue implements org.omg.CORBA.portable.IDLEntity
  16. {
  17. private int __value;
  18. private static int __size = 2;
  19. private static org.omg.PortableServer.ThreadPolicyValue[] __array = new org.omg.PortableServer.ThreadPolicyValue [__size];
  20. public static final int _ORB_CTRL_MODEL = 0;
  21. public static final org.omg.PortableServer.ThreadPolicyValue ORB_CTRL_MODEL = new org.omg.PortableServer.ThreadPolicyValue(_ORB_CTRL_MODEL);
  22. public static final int _SINGLE_THREAD_MODEL = 1;
  23. public static final org.omg.PortableServer.ThreadPolicyValue SINGLE_THREAD_MODEL = new org.omg.PortableServer.ThreadPolicyValue(_SINGLE_THREAD_MODEL);
  24. public int value ()
  25. {
  26. return __value;
  27. }
  28. public static org.omg.PortableServer.ThreadPolicyValue from_int (int value)
  29. {
  30. if (value >= 0 && value < __size)
  31. return __array[value];
  32. else
  33. throw new org.omg.CORBA.BAD_PARAM ();
  34. }
  35. protected ThreadPolicyValue (int value)
  36. {
  37. __value = value;
  38. __array[__value] = this;
  39. }
  40. } // class ThreadPolicyValue