org.omg.PortableServer

Class ThreadPolicyValue

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.
Field Summary
static ThreadPolicyValueORB_CTRL_MODEL
An instance of ThreadPolicyValue, initialized to ORB_CTRL_MODEL.
static ThreadPolicyValueSINGLE_THREAD_MODEL
An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL.
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).
Constructor Summary
protected ThreadPolicyValue(int a_value)
Normally, no new instances are required, so the constructor is protected.
Method Summary
static ThreadPolicyValuefrom_int(int code)
Returns the ThreadPolicyValue, matching the given integer constant.
StringtoString()
Returns a short string representation.
intvalue()
Returns the integer code of the enumeration value.

Field Detail

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 ThreadPolicyValue SINGLE_THREAD_MODEL
An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL.

_ORB_CTRL_MODEL

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

_SINGLE_THREAD_MODEL

public static final int _SINGLE_THREAD_MODEL
The possible value of this enumeration (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.

Returns: the name of the current enumeration value.

value

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

Returns: one of ORB_CTRL_MODEL, SINGLE_THREAD_MODEL.