#include <RT_Policy_i.h>
Inheritance diagram for TAO_PriorityModelPolicy:
Public Member Functions | |
TAO_PriorityModelPolicy (RTCORBA::PriorityModel priority_model, RTCORBA::Priority server_priority) | |
Constructor. | |
TAO_PriorityModelPolicy (const TAO_PriorityModelPolicy &rhs) | |
Copy constructor. | |
RTCORBA::PriorityModel | get_priority_model (void) |
RTCORBA::PriorityModel | priority_model () throw (CORBA::SystemException) |
RTCORBA::Priority | server_priority () throw (CORBA::SystemException) |
CORBA::PolicyType | policy_type () throw (CORBA::SystemException) |
CORBA::Policy_ptr | copy () throw (CORBA::SystemException) |
void | destroy () throw (CORBA::SystemException) |
CORBA::Boolean | _tao_encode (TAO_OutputCDR &out_cdr) |
This method writes a CDR representation of the object state. | |
CORBA::Boolean | _tao_decode (TAO_InputCDR &in_cdr) |
This method reads the object state from a CDR representation. | |
TAO_Cached_Policy_Type | _tao_cached_type (void) const |
TAO_Policy_Scope | _tao_scope (void) const |
Static Public Member Functions | |
CORBA::Policy_ptr | create (const CORBA::Any &val) |
Protected Member Functions | |
virtual | ~TAO_PriorityModelPolicy (void) |
TAO_PriorityModelPolicy (void) | |
Private Attributes | |
RTCORBA::PriorityModel | priority_model_ |
Attributes. | |
RTCORBA::Priority | server_priority_ |
Friends | |
class | TAO_RT_PolicyFactory |
This policy controls how the priority at which a server handles requests from clients is determined.
Definition at line 51 of file RT_Policy_i.h.
|
Constructor.
Definition at line 23 of file RT_Policy_i.cpp. References RTCORBA::Priority.
00026 : ::CORBA::Object () 00027 , ::CORBA::Policy () 00028 , ::CORBA::LocalObject () 00029 , RTCORBA::PriorityModelPolicy () 00030 , TAO_Local_RefCounted_Object () 00031 , priority_model_ (priority_model) 00032 , server_priority_ (server_priority) 00033 { 00034 } |
|
Copy constructor.
Definition at line 36 of file RT_Policy_i.cpp.
00037 : ::CORBA::Object () 00038 , ::CORBA::Policy () 00039 , ::CORBA::LocalObject () 00040 , RTCORBA::PriorityModelPolicy () 00041 , TAO_Local_RefCounted_Object () 00042 , priority_model_ (rhs.priority_model_) 00043 , server_priority_ (rhs.server_priority_) 00044 { 00045 } |
|
Protected destructor to enforce proper memory management of this reference counted object. Definition at line 53 of file RT_Policy_i.cpp.
00054 { 00055 } |
|
Definition at line 47 of file RT_Policy_i.cpp.
00048 : priority_model_ (RTCORBA::SERVER_DECLARED), 00049 server_priority_ (0) 00050 { 00051 } |
|
Implements CORBA::Policy. Definition at line 134 of file RT_Policy_i.cpp. References TAO_CACHED_POLICY_PRIORITY_MODEL.
00135 { 00136 return TAO_CACHED_POLICY_PRIORITY_MODEL; 00137 } |
|
This method reads the object state from a CDR representation.
Implements CORBA::Policy. Definition at line 128 of file RT_Policy_i.cpp. References priority_model_, and server_priority_.
00129 { 00130 return ((in_cdr >> priority_model_) && (in_cdr >> server_priority_)); 00131 } |
|
This method writes a CDR representation of the object state.
Implements CORBA::Policy. Definition at line 118 of file RT_Policy_i.cpp. References priority_model_, and server_priority_.
00119 { 00120 // Note: the fields are encoded according to 00121 // the order specified in the RTCORBA 1.0 spec (ptc/99-05-03) 00122 // section 4.7.3. 00123 00124 return ((out_cdr << priority_model_) && (out_cdr << server_priority_)); 00125 } |
|
Implements CORBA::Policy. Definition at line 140 of file RT_Policy_i.cpp. References TAO_POLICY_ORB_SCOPE, and TAO_POLICY_POA_SCOPE.
00141 { 00142 // Note that this policy is propogated to the client even though 00143 // it is not specified here. The reason for this is that the 00144 // server priority field is set dynamically depending on the model 00145 // and the servant's priority. Therefore, it can't be simply 00146 // copied to the list of client exposed policies. 00147 return static_cast<TAO_Policy_Scope> (TAO_POLICY_ORB_SCOPE | 00148 TAO_POLICY_POA_SCOPE); 00149 } |
|
Implements RTCORBA::PriorityModelPolicy. Definition at line 98 of file RT_Policy_i.cpp. References ACE_CHECK_RETURN, and ACE_NEW_THROW_EX.
00100 { 00101 TAO_PriorityModelPolicy* tmp = 0; 00102 ACE_NEW_THROW_EX (tmp, 00103 TAO_PriorityModelPolicy (*this), 00104 CORBA::NO_MEMORY (TAO::VMCID, 00105 CORBA::COMPLETED_NO)); 00106 ACE_CHECK_RETURN (CORBA::Policy::_nil ()); 00107 00108 return tmp; 00109 } |
|
Helper method for the implementation of CORBA::ORB::create_policy. Definition at line 58 of file RT_Policy_i.cpp. References ACE_THROW_RETURN. Referenced by TAO_RT_PolicyFactory::create_policy().
00060 { 00061 /* 00062 * @@ The following code should be changed once the OMG spec has 00063 * been fixed such that a RTCORBA::PriorityModelPolicy can be 00064 * created by using the ORB::create_policy interface. 00065 */ 00066 ACE_THROW_RETURN (CORBA::PolicyError (CORBA::BAD_POLICY_VALUE), 00067 CORBA::Policy::_nil ()); 00068 } |
|
Implements RTCORBA::PriorityModelPolicy. Definition at line 112 of file RT_Policy_i.cpp.
00114 { 00115 } |
|
Accessor for the attribute. This method is used internally by the orb. This is a more efficient (non-virtual, no exception handling) relative of the idl interface implementation below. Definition at line 71 of file RT_Policy_i.cpp. References priority_model_. Referenced by TAO_RT_Protocols_Hooks::add_rt_service_context_hook(), and TAO_RT_Protocols_Hooks::get_selector_hook().
00072 { 00073 return this->priority_model_; 00074 } |
|
Implements CORBA::Policy. Definition at line 91 of file RT_Policy_i.cpp.
00093 {
00094 return RTCORBA::PRIORITY_MODEL_POLICY_TYPE;
00095 }
|
|
Implements RTCORBA::PriorityModelPolicy. Definition at line 77 of file RT_Policy_i.cpp.
00079 { 00080 return this->priority_model_; 00081 } |
|
Implements RTCORBA::PriorityModelPolicy. Definition at line 84 of file RT_Policy_i.cpp. Referenced by TAO_RT_Protocols_Hooks::get_selector_hook().
00086 { 00087 return this->server_priority_; 00088 } |
|
This constructor is used by TAO_RT_PolicyFactory when decoding policies from tagged components in an IOR. Definition at line 111 of file RT_Policy_i.h. |
|
Attributes.
Definition at line 117 of file RT_Policy_i.h. Referenced by _tao_decode(), _tao_encode(), and get_priority_model(). |
|
Definition at line 118 of file RT_Policy_i.h. Referenced by _tao_decode(), and _tao_encode(). |