org.omg.PortableServer
Class ThreadPolicyValue

java.lang.Object
  extended by org.omg.PortableServer.ThreadPolicyValue
All Implemented Interfaces:
Serializable, IDLEntity

public class ThreadPolicyValue
extends Object
implements Serializable, IDLEntity

Defines the possible values for the POA thread policy. This enumeration can obtain the following values:

OMG also defines a MAIN_THREAD_MODEL, currently not supported by the java API.

See Also:
Serialized Form

Field Summary
static int _ORB_CTRL_MODEL
          The possible value of this enumeration (ORB_CTRL_MODEL).
static int _SINGLE_THREAD_MODEL
          The possible value of this enumeration (SINGLE_THREAD_MODEL).
static ThreadPolicyValue ORB_CTRL_MODEL
          An instance of ThreadPolicyValue, initialized to ORB_CTRL_MODEL.
static ThreadPolicyValue SINGLE_THREAD_MODEL
          An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL.
 
Constructor Summary
protected ThreadPolicyValue(int a_value)
          Normally, no new instances are required, so the constructor is protected.
 
Method Summary
static ThreadPolicyValue from_int(int code)
          Returns the ThreadPolicyValue, matching the given integer constant.
 String toString()
          Returns a short string representation.
 int value()
          Returns the integer code of the enumeration value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_ORB_CTRL_MODEL

public static final int _ORB_CTRL_MODEL
The possible value of this enumeration (ORB_CTRL_MODEL).

See Also:
Constant Field Values

ORB_CTRL_MODEL

public static final ThreadPolicyValue ORB_CTRL_MODEL
An instance of ThreadPolicyValue, initialized to ORB_CTRL_MODEL.


_SINGLE_THREAD_MODEL

public static final int _SINGLE_THREAD_MODEL
The possible value of this enumeration (SINGLE_THREAD_MODEL).

See Also:
Constant Field Values

SINGLE_THREAD_MODEL

public static final ThreadPolicyValue SINGLE_THREAD_MODEL
An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL.

Constructor Detail

ThreadPolicyValue

protected ThreadPolicyValue(int a_value)
Normally, no new instances are required, so the constructor is protected.

Method Detail

from_int

public static ThreadPolicyValue from_int(int code)
Returns the ThreadPolicyValue, matching the given integer constant.

Parameters:
code - one of _ORB_CTRL_MODEL, _SINGLE_THREAD_MODEL.
Returns:
one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.
Throws:
BAD_PARAM - if the parameter is not one of the valid values.

toString

public String toString()
Returns a short string representation.

Overrides:
toString in class Object
Returns:
the name of the current enumeration value.
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)

value

public int value()
Returns the integer code of the enumeration value.

Returns:
one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.