org.omg.PortableServer
public class: ThreadPolicyValue [javadoc |
source]
java.lang.Object
org.omg.PortableServer.ThreadPolicyValue
All Implemented Interfaces:
IDLEntity, Serializable
Defines the possible values for the POA thread policy.
This enumeration can obtain the following values:
- ORB_CTRL_MODEL Each object in POA has a separate serving thread
and a separate server socket, listening on the objects individual
port. Additionally, when the request is accepted, it is also
served in a separate thread, so several requests to the same
object can be processed in parallel. The servant can always get
the Id and POA of the object it is currently serving by
invoking Servant#_object_id() and Servant#_poa .
These two methods use thread to data map and must work correctly
even then the servant code is executed in several parallel threads.
- SINGLE_THREAD_MODEL All objects in POA share the same server
socket and are served in the same thread. This model is applicable
when the number of objects is greater than the number of threads
and (or) ports, supported by the system.
OMG also defines a MAIN_THREAD_MODEL, currently not supported by
the java API.
- author:
Audrius - Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
| Field Summary |
|---|
| public static final int | _ORB_CTRL_MODEL | The possible value of this enumeration (ORB_CTRL_MODEL). |
| public static final ThreadPolicyValue | ORB_CTRL_MODEL | An instance of ThreadPolicyValue, initialized to ORB_CTRL_MODEL. |
| public static final int | _SINGLE_THREAD_MODEL | The possible value of this enumeration (SINGLE_THREAD_MODEL). |
| public static final ThreadPolicyValue | SINGLE_THREAD_MODEL | An instance of ThreadPolicyValue, initialized to SINGLE_THREAD_MODEL. |
| Method from org.omg.PortableServer.ThreadPolicyValue Detail: |
public static ThreadPolicyValue from_int(int code) {
try
{
return enume [ code ];
}
catch (ArrayIndexOutOfBoundsException ex)
{
BAD_OPERATION bad = new BAD_OPERATION("Invalid policy code " + code);
bad.minor = Minor.PolicyType;
throw bad;
}
}
Returns the ThreadPolicyValue, matching the given integer constant. |
public String toString() {
return state_names [ _value ];
}
Returns a short string representation. |
public int value() {
return _value;
}
Returns the integer code of the enumeration value. |