From 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Mon, 24 Jul 2006 15:50:21 +0000 Subject: Repo restructuring --- TAO/tao/RTCORBA/RT_Stub.h | 140 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 TAO/tao/RTCORBA/RT_Stub.h (limited to 'TAO/tao/RTCORBA/RT_Stub.h') diff --git a/TAO/tao/RTCORBA/RT_Stub.h b/TAO/tao/RTCORBA/RT_Stub.h new file mode 100644 index 00000000000..fcaf8a32562 --- /dev/null +++ b/TAO/tao/RTCORBA/RT_Stub.h @@ -0,0 +1,140 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file RT_Stub.h + * + * $Id$ + * + * This file contains the declaration for the RTCORBA Stub. + * + * + * @author Angelo Corsaro + * @author Frank Hunleth + */ +//============================================================================= + +#ifndef TAO_RT_STUB_H_ +#define TAO_RT_STUB_H_ + +#include /**/ "ace/pre.h" + +#include "tao/orbconf.h" + +#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 + +#include "tao/RTCORBA/rtcorba_export.h" + +#include "tao/Stub.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward references. +class TAO_PriorityModelPolicy; +class TAO_PriorityBandedConnectionPolicy; +class TAO_ClientProtocolPolicy; +class TAO_PrivateConnectionPolicy; + +/** + * @class TAO_RT_Stub + * + * This class represent a stub with extended functionality, which are needed + * for RTCORBA. + */ +class TAO_RTCORBA_Export TAO_RT_Stub : public TAO_Stub +{ +public: + + TAO_RT_Stub (const char *repository_id, + const TAO_MProfile &profiles, + TAO_ORB_Core *orb_core); + + virtual ~TAO_RT_Stub (void); + + +#if (TAO_HAS_CORBA_MESSAGING == 1) + + /** + * Returns the effective policy if is a known client-exposed + * policy type. Returns the effective override for all other policy + * types. + */ + CORBA::Policy_ptr get_policy (CORBA::PolicyType type + ACE_ENV_ARG_DECL); + + CORBA::Policy_ptr get_cached_policy (TAO_Cached_Policy_Type type + ACE_ENV_ARG_DECL); + + TAO_Stub* set_policy_overrides (const CORBA::PolicyList & policies, + CORBA::SetOverrideType set_add + ACE_ENV_ARG_DECL); + +#endif /* TAO_HAS_CORBA_MESSAGING */ + +private: + + /// Helper method used to parse the policies. + void parse_policies (ACE_ENV_SINGLE_ARG_DECL); + + void exposed_priority_model (CORBA::Policy_ptr policy); + + void exposed_priority_banded_connection (CORBA::Policy_ptr policy); + + void exposed_client_protocol (CORBA::Policy_ptr policy); + + /// Returns the CORBA::Policy (which will be narrowed to be + /// used as RTCORBA::PriorityModelPolicy) exported + /// in object's IOR. + CORBA::Policy_ptr exposed_priority_model (ACE_ENV_SINGLE_ARG_DECL); + + /// Returns the CORBA::Policy (which will be narrowed and used + /// as RTCORBA::PriorityBandedConnectionPolicy) exported + /// in object's IOR. + CORBA::Policy_ptr exposed_priority_banded_connection (ACE_ENV_SINGLE_ARG_DECL); + + /// Returns the CORBA::Policy (which will be narrowed and used + /// as RTCORBA::ClientProtocolPolicy) exported + /// in object's IOR. + CORBA::Policy_ptr exposed_client_protocol (ACE_ENV_SINGLE_ARG_DECL); + + // = Methods for obtaining effective policies. + // + // Effective policy is the one that would be used if a request + // were made. The policy is determined by obtaining the effective + // override for a given policy type, and then reconciling it with + // the policy value exported in the Object's IOR. + + CORBA::Policy *effective_priority_banded_connection (ACE_ENV_SINGLE_ARG_DECL); + CORBA::Policy *effective_client_protocol (ACE_ENV_SINGLE_ARG_DECL); + + // The following attribute are used to cache + // the different kind of policies and avoid to + // parse the MProfile's policy list each time we + // are asked about a given policy. + + CORBA::Policy_var priority_model_policy_; + + CORBA::Policy_var priority_banded_connection_policy_; + + CORBA::Policy_var client_protocol_policy_; + + CORBA::Boolean are_policies_parsed_; + +private: + // = Disallow copying and assignment. + TAO_RT_Stub (const TAO_RT_Stub &); + TAO_RT_Stub &operator = (const TAO_RT_Stub &); + +}; + +TAO_END_VERSIONED_NAMESPACE_DECL + +#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */ + +#include /**/ "ace/post.h" + +#endif /* TAO_RT_STUB_FACTORY_H_ */ -- cgit v1.2.1