3 //=============================================================================
5 * @file Table_Adapter.h
7 * @author Carlos O'Ryan (coryan@uci.edu)
9 //=============================================================================
12 #ifndef TAO_TABLE_ADAPTER_H
13 #define TAO_TABLE_ADAPTER_H
14 #include /**/ "ace/pre.h"
16 #include "tao/IORTable/iortable_export.h"
17 #include "tao/IORTable/IORTable.h"
18 #include "tao/IORTable/IOR_Table_Impl.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/Adapter.h"
25 #include "tao/Adapter_Factory.h"
26 #include "ace/Service_Config.h"
28 #include "tao/ORB_Core.h"
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 class TAO_IORTable_Export TAO_Table_Adapter
: public TAO_Adapter
36 TAO_Table_Adapter (TAO_ORB_Core
&orb_core
);
39 virtual ~TAO_Table_Adapter ();
41 // = The TAO_Adapter methods, please check tao/Adapter.h for the
44 virtual void close (int wait_for_completion
);
45 virtual void check_close (int wait_for_completion
);
46 virtual int priority () const;
47 virtual int dispatch (TAO::ObjectKey
&key
,
48 TAO_ServerRequest
&request
,
49 CORBA::Object_out foward_to
);
51 virtual const char *name () const;
52 virtual CORBA::Object_ptr
root ();
53 virtual CORBA::Object_ptr
create_collocated_object (TAO_Stub
*,
54 const TAO_MProfile
&);
56 virtual CORBA::Long
initialize_collocated_object (TAO_Stub
*stub
);
59 static ACE_Lock
* create_lock (TAO_SYNCH_MUTEX
&l
);
61 /// Helper method to find an object bound in the table.
62 bool find_object (TAO::ObjectKey
&key
,
63 CORBA::Object_out forward_to
);
65 /// The ORB Core we belong to
66 TAO_ORB_Core
&orb_core_
;
68 /// The table implementation
69 TAO_IOR_Table_Impl_var root_
;
72 TAO_SYNCH_MUTEX thread_lock_
;
76 // ****************************************************************
78 class TAO_IORTable_Export TAO_Table_Adapter_Factory
: public TAO_Adapter_Factory
82 TAO_Table_Adapter_Factory ();
84 /// The TAO_Adapter_Factory methods, please read tao/Adapter.h for
86 virtual TAO_Adapter
*create (TAO_ORB_Core
*orb_core
);
89 TAO_END_VERSIONED_NAMESPACE_DECL
91 ACE_STATIC_SVC_DECLARE (TAO_Table_Adapter_Factory
)
92 ACE_FACTORY_DECLARE (TAO_IORTable
, TAO_Table_Adapter_Factory
)
94 #include /**/ "ace/post.h"
95 #endif /* TAO_TABLE_ADAPTER_H */