KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > PortableServer > ThreadPolicyValue


1 package org.omg.PortableServer;
2
3
4 /**
5 * org/omg/PortableServer/ThreadPolicyValue.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.2"
7 * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
8 * Saturday, February 9, 2008 9:40:02 AM GMT
9 */

10
11
12 /**
13      * The ThreadPolicyValue can have the following values.
14      * ORB_CTRL_MODEL - The ORB is responsible for assigning
15      * requests for an ORB- controlled POA to threads.
16      * SINGLE_THREAD_MODEL - Requests for a single-threaded
17      * POA are processed sequentially.
18      */

19 public class ThreadPolicyValue implements org.omg.CORBA.portable.IDLEntity JavaDoc
20 {
21   private int __value;
22   private static int __size = 2;
23   private static org.omg.PortableServer.ThreadPolicyValue JavaDoc[] __array = new org.omg.PortableServer.ThreadPolicyValue JavaDoc [__size];
24
25   public static final int _ORB_CTRL_MODEL = 0;
26   public static final org.omg.PortableServer.ThreadPolicyValue JavaDoc ORB_CTRL_MODEL = new org.omg.PortableServer.ThreadPolicyValue JavaDoc(_ORB_CTRL_MODEL);
27   public static final int _SINGLE_THREAD_MODEL = 1;
28   public static final org.omg.PortableServer.ThreadPolicyValue JavaDoc SINGLE_THREAD_MODEL = new org.omg.PortableServer.ThreadPolicyValue JavaDoc(_SINGLE_THREAD_MODEL);
29
30   public int value ()
31   {
32     return __value;
33   }
34
35   public static org.omg.PortableServer.ThreadPolicyValue JavaDoc from_int (int value)
36   {
37     if (value >= 0 && value < __size)
38       return __array[value];
39     else
40       throw new org.omg.CORBA.BAD_PARAM JavaDoc ();
41   }
42
43   protected ThreadPolicyValue (int value)
44   {
45     __value = value;
46     __array[__value] = this;
47   }
48 } // class ThreadPolicyValue
49
Popular Tags