00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TAO_ABSTRACT_SERVANT_BASE_H_
00019 #define TAO_ABSTRACT_SERVANT_BASE_H_
00020
00021 #include "ace/pre.h"
00022
00023 #include "tao/TAO_Export.h"
00024
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif
00028
00029 #include "tao/Basic_Types.h"
00030 #include "tao/Collocation_Strategy.h"
00031 #include "tao/CORBA_methods.h"
00032 #include "tao/Pseudo_VarOut_T.h"
00033
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035
00036 class TAO_ServerRequest;
00037 class TAO_Stub;
00038 class TAO_Abstract_ServantBase;
00039
00040 namespace CORBA
00041 {
00042 class InterfaceDef;
00043 typedef InterfaceDef *InterfaceDef_ptr;
00044
00045 class Object;
00046 typedef Object *Object_ptr;
00047 typedef TAO_Pseudo_Var_T<Object> Object_var;
00048 typedef TAO_Pseudo_Out_T<Object> Object_out;
00049 }
00050
00051 namespace TAO
00052 {
00053 class Argument;
00054 }
00055
00056 typedef void (*TAO_Skeleton)(
00057 TAO_ServerRequest &,
00058 void *,
00059 void *
00060 );
00061
00062 typedef void (*TAO_Collocated_Skeleton)(
00063 TAO_Abstract_ServantBase *,
00064 TAO::Argument **,
00065 int
00066 );
00067
00068 class TAO_Export TAO_Abstract_ServantBase
00069 {
00070 public:
00071
00072 virtual ~TAO_Abstract_ServantBase (void);
00073
00074
00075 virtual CORBA::Boolean _is_a (const char* logical_type_id) = 0;
00076
00077 #if (TAO_HAS_MINIMUM_CORBA == 0)
00078
00079 virtual CORBA::Boolean _non_existent (void) = 0;
00080
00081 #if !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00082
00083 virtual CORBA::InterfaceDef_ptr _get_interface (void) = 0;
00084
00085
00086 virtual CORBA::Object_ptr _get_component (void) = 0;
00087 #endif
00088
00089
00090 virtual char * _repository_id (void) = 0;
00091 #endif
00092
00093
00094
00095
00096
00097
00098 virtual void _add_ref (void) = 0;
00099
00100
00101
00102
00103
00104
00105 virtual void _remove_ref (void) = 0;
00106
00107
00108 virtual CORBA::ULong _refcount_value (void) const = 0;
00109
00110
00111
00112 virtual TAO_Stub *_create_stub (void) = 0;
00113
00114
00115
00116 virtual int _find (const char *opname,
00117 TAO_Skeleton &skelfunc,
00118 const size_t length = 0) = 0;
00119
00120
00121
00122
00123 virtual int _find (const char *opname,
00124 TAO_Collocated_Skeleton &skelfunc,
00125 TAO::Collocation_Strategy s,
00126 const size_t length = 0) = 0;
00127
00128 protected:
00129
00130
00131 TAO_Abstract_ServantBase (void);
00132
00133
00134 TAO_Abstract_ServantBase (const TAO_Abstract_ServantBase &);
00135
00136
00137 TAO_Abstract_ServantBase &operator= (const TAO_Abstract_ServantBase &);
00138
00139
00140
00141
00142
00143
00144
00145
00146 virtual void _dispatch (TAO_ServerRequest &request,
00147 void *servant_upcall) = 0;
00148
00149 virtual void synchronous_upcall_dispatch (TAO_ServerRequest &req,
00150 void *servant_upcall,
00151 void *derived_this) = 0;
00152
00153
00154 virtual const char *_interface_repository_id (void) const = 0;
00155 };
00156
00157 TAO_END_VERSIONED_NAMESPACE_DECL
00158
00159 #if defined(__ACE_INLINE__)
00160 #include "tao/Abstract_Servant_Base.inl"
00161 #endif
00162
00163 #include "ace/post.h"
00164
00165 #endif