RTCORBA::PriorityModelPolicy implementation. More...
#include <RT_Policy_i.h>


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 (void) |
| RTCORBA::Priority | server_priority (void) |
| CORBA::PolicyType | policy_type (void) |
| CORBA::Policy_ptr | copy (void) |
| void | destroy (void) |
| 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 | |
| static 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 |
RTCORBA::PriorityModelPolicy implementation.
This policy controls how the priority at which a server handles requests from clients is determined.
Definition at line 48 of file RT_Policy_i.h.
| TAO_PriorityModelPolicy::TAO_PriorityModelPolicy | ( | RTCORBA::PriorityModel | priority_model, | |
| RTCORBA::Priority | server_priority | |||
| ) |
Constructor.
Definition at line 24 of file RT_Policy_i.cpp.
: ::CORBA::Object () , ::CORBA::Policy () , RTCORBA::PriorityModelPolicy () , ::CORBA::LocalObject () , priority_model_ (priority_model) , server_priority_ (server_priority) { }
| TAO_PriorityModelPolicy::TAO_PriorityModelPolicy | ( | const TAO_PriorityModelPolicy & | rhs | ) |
Copy constructor.
Definition at line 36 of file RT_Policy_i.cpp.
: ::CORBA::Object () , ::CORBA::Policy () , RTCORBA::PriorityModelPolicy () , ::CORBA::LocalObject () , priority_model_ (rhs.priority_model_) , server_priority_ (rhs.server_priority_) { }
| TAO_PriorityModelPolicy::~TAO_PriorityModelPolicy | ( | void | ) | [protected, virtual] |
Protected destructor to enforce proper memory management of this reference counted object.
Definition at line 52 of file RT_Policy_i.cpp.
{
}
| TAO_PriorityModelPolicy::TAO_PriorityModelPolicy | ( | void | ) | [protected] |
Definition at line 46 of file RT_Policy_i.cpp.
: priority_model_ (RTCORBA::SERVER_DECLARED), server_priority_ (0) { }
| TAO_Cached_Policy_Type TAO_PriorityModelPolicy::_tao_cached_type | ( | void | ) | const |
Definition at line 125 of file RT_Policy_i.cpp.
{
return TAO_CACHED_POLICY_PRIORITY_MODEL;
}
| CORBA::Boolean TAO_PriorityModelPolicy::_tao_decode | ( | TAO_InputCDR & | in_cdr | ) |
This method reads the object state from a CDR representation.
Definition at line 119 of file RT_Policy_i.cpp.
{
return ((in_cdr >> priority_model_) && (in_cdr >> server_priority_));
}
| CORBA::Boolean TAO_PriorityModelPolicy::_tao_encode | ( | TAO_OutputCDR & | out_cdr | ) |
This method writes a CDR representation of the object state.
Definition at line 109 of file RT_Policy_i.cpp.
{
// Note: the fields are encoded according to
// the order specified in the RTCORBA 1.0 spec (ptc/99-05-03)
// section 4.7.3.
return ((out_cdr << priority_model_) && (out_cdr << server_priority_));
}
| TAO_Policy_Scope TAO_PriorityModelPolicy::_tao_scope | ( | void | ) | const |
Definition at line 131 of file RT_Policy_i.cpp.
{
// Note that this policy is propogated to the client even though
// it is not specified here. The reason for this is that the
// server priority field is set dynamically depending on the model
// and the servant's priority. Therefore, it can't be simply
// copied to the list of client exposed policies.
return static_cast<TAO_Policy_Scope> (TAO_POLICY_ORB_SCOPE |
TAO_POLICY_POA_SCOPE);
}
| CORBA::Policy_ptr TAO_PriorityModelPolicy::copy | ( | void | ) |
Definition at line 92 of file RT_Policy_i.cpp.
{
TAO_PriorityModelPolicy* tmp = 0;
ACE_NEW_THROW_EX (tmp,
TAO_PriorityModelPolicy (*this),
CORBA::NO_MEMORY (TAO::VMCID,
CORBA::COMPLETED_NO));
return tmp;
}
| CORBA::Policy_ptr TAO_PriorityModelPolicy::create | ( | const CORBA::Any & | val | ) | [static] |
Helper method for the implementation of CORBA::ORB::create_policy.
Definition at line 57 of file RT_Policy_i.cpp.
{
/*
* @@ The following code should be changed once the OMG spec has
* been fixed such that a RTCORBA::PriorityModelPolicy can be
* created by using the ORB::create_policy interface.
*/
throw ::CORBA::PolicyError (CORBA::BAD_POLICY_VALUE);
}
| void TAO_PriorityModelPolicy::destroy | ( | void | ) |
Definition at line 104 of file RT_Policy_i.cpp.
{
}
| RTCORBA::PriorityModel TAO_PriorityModelPolicy::get_priority_model | ( | void | ) |
Accessor for the <priority_model_> 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 <priority_model> below.
Definition at line 68 of file RT_Policy_i.cpp.
{
return this->priority_model_;
}
| CORBA::PolicyType TAO_PriorityModelPolicy::policy_type | ( | void | ) |
Definition at line 86 of file RT_Policy_i.cpp.
{
return RTCORBA::PRIORITY_MODEL_POLICY_TYPE;
}
| RTCORBA::PriorityModel TAO_PriorityModelPolicy::priority_model | ( | void | ) |
Definition at line 74 of file RT_Policy_i.cpp.
{
return this->priority_model_;
}
| RTCORBA::Priority TAO_PriorityModelPolicy::server_priority | ( | void | ) |
Definition at line 80 of file RT_Policy_i.cpp.
{
return this->server_priority_;
}
friend class TAO_RT_PolicyFactory [friend] |
This constructor is used by TAO_RT_PolicyFactory when decoding policies from tagged components in an IOR.
Definition at line 102 of file RT_Policy_i.h.
RTCORBA::PriorityModel TAO_PriorityModelPolicy::priority_model_ [private] |
Attributes.
Definition at line 108 of file RT_Policy_i.h.
RTCORBA::Priority TAO_PriorityModelPolicy::server_priority_ [private] |
Definition at line 109 of file RT_Policy_i.h.
1.7.0