LocateRequest_Invocation_Adapter.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    LocateRequest_Invocation_Adapter.h
00006  *
00007  *  $Id: LocateRequest_Invocation_Adapter.h 79705 2007-09-24 07:45:37Z johnnyw $
00008  *
00009  *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 #ifndef TAO_LOCATEREQUEST_INVOCATION_ADAPTER_H
00013 #define TAO_LOCATEREQUEST_INVOCATION_ADAPTER_H
00014 
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "tao/Policy_ForwardC.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/Pseudo_VarOut_T.h"
00024 
00025 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00026 class ACE_Time_Value;
00027 ACE_END_VERSIONED_NAMESPACE_DECL
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace CORBA
00032 {
00033   class Object;
00034   typedef Object *Object_ptr;
00035   typedef TAO_Pseudo_Var_T<Object> Object_var;
00036 }
00037 
00038 class TAO_Stub;
00039 
00040 namespace TAO
00041 {
00042   /**
00043    * @class LocateRequest_Invocation_Adapter
00044    *
00045    * @brief Adapter class for locate request invocations.
00046    *
00047    *  This class provides a look and feel similar to the
00048    *  TAO::Invocation_Adapter though the functionalities are
00049    *  different. For the record, IDL compiler doesn't know the
00050    *  existence of this class. This class is concerned with the
00051    *  creation and invocation of locate request invocations to the
00052    *  target object
00053    *
00054    * @todo Need to think what happens if the target is
00055    *  collocated. Looks like there are no ways to utilize the
00056    *  opportunity that may have been presented.
00057    */
00058   class LocateRequest_Invocation_Adapter
00059   {
00060   public:
00061     LocateRequest_Invocation_Adapter (CORBA::Object_ptr target);
00062 
00063     /// Start the invocation on the target
00064     void invoke (void);
00065 
00066     /// Accessor to the inconsistent policy list
00067     CORBA::PolicyList *get_inconsistent_policies (void);
00068 
00069   private:
00070 
00071     bool get_timeout (ACE_Time_Value &val);
00072 
00073     /// Helper method that takes care of setting the profiles within
00074     /// the stub object if the target gets forwarded
00075     void object_forwarded (CORBA::Object_var &effective_target,
00076                            TAO_Stub *stub,
00077                            CORBA::Boolean permanent_forward);
00078 
00079   private:
00080     CORBA::Object_ptr target_;
00081     CORBA::PolicyList_var list_;
00082   };
00083 }
00084 
00085 TAO_END_VERSIONED_NAMESPACE_DECL
00086 
00087 #include /**/ "ace/post.h"
00088 
00089 #endif /*TAO_LOCATEREQUEST_INVOCATION_ADAPTER_H*/

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7