The policy-driven details for a registered client request interceptor. More...
#include <ClientRequestDetails.h>
Public Member Functions | |
ClientRequestDetails (void) | |
void | apply_policies (const CORBA::PolicyList &policies) |
bool | should_be_processed (bool is_remote_request) const |
Private Attributes | |
PortableInterceptor::ProcessingMode | processing_mode_ |
The policy-driven details for a registered client request interceptor.
Each time a client request interceptor is registered with an ORB, a ClientRequestDetails object will be created and associated with the registered client request interceptor. If the interceptor is registered with policies, the policies will be used to adjust the values in the ClientRequestDetails appropriately.
Definition at line 51 of file ClientRequestDetails.h.
TAO::ClientRequestDetails::ClientRequestDetails | ( | void | ) |
Definition at line 10 of file ClientRequestDetails.inl.
: processing_mode_(PortableInterceptor::LOCAL_AND_REMOTE) { }
void TAO::ClientRequestDetails::apply_policies | ( | const CORBA::PolicyList & | policies | ) |
Definition at line 4 of file ClientRequestDetails.cpp.
: ClientRequestDetails.cpp 76995 2007-02-11 12:51:42Z johnnyw $") TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { void ClientRequestDetails::apply_policies (const CORBA::PolicyList &policies) { // Flag to check for duplicate ProcessingModePolicy objects in the list. bool processing_mode_applied = false; const CORBA::ULong plen = policies.length (); for (CORBA::ULong i = 0; i < plen; ++i) { CORBA::Policy_var policy = CORBA::Policy::_duplicate (policies[i]); if (CORBA::is_nil (policy.in ())) { // Just ignore nil policies... continue; } // Obtain the PolicyType from the current Policy object. const CORBA::PolicyType policy_type = policy->policy_type (); if (policy_type == PortableInterceptor::PROCESSING_MODE_POLICY_TYPE) { if (processing_mode_applied) { // This is the second time we have run into this policy type, // and that is not allowed. throw ::CORBA::INV_POLICY (); } // Flip the flag to true in order to trap any dupes. processing_mode_applied = true;
bool TAO::ClientRequestDetails::should_be_processed | ( | bool | is_remote_request | ) | const |
Returns true if the ProcessingMode setting permits the "firing" of the associated client request interceptor based upon the remote vs. collocated nature of the current servant request that is being dispatched.
Definition at line 17 of file ClientRequestDetails.inl.
{
return ((this->processing_mode_ == PortableInterceptor::LOCAL_AND_REMOTE) ||
((this->processing_mode_ == PortableInterceptor::REMOTE_ONLY) &&
(is_remote_request)) ||
((this->processing_mode_ == PortableInterceptor::LOCAL_ONLY) &&
(!is_remote_request)));
}
PortableInterceptor::ProcessingMode TAO::ClientRequestDetails::processing_mode_ [private] |
The ProcessingMode setting that can be adjusted via the PortableInterceptor::ProcessingModePolicy.
Definition at line 69 of file ClientRequestDetails.h.