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 "ace/CORBA_macros.h"
00024
00025 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00026 # pragma once
00027 #endif
00028
00029 #include "tao/TAO_Export.h"
00030 #include "tao/Basic_Types.h"
00031 #include "tao/Collocation_Strategy.h"
00032 #include "tao/CORBA_methods.h"
00033 #include "tao/Pseudo_VarOut_T.h"
00034
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036
00037 class TAO_ServerRequest;
00038 class TAO_Stub;
00039 class TAO_Abstract_ServantBase;
00040
00041 namespace CORBA
00042 {
00043 class InterfaceDef;
00044 typedef InterfaceDef *InterfaceDef_ptr;
00045
00046 class Environment;
00047
00048 class Object;
00049 typedef Object *Object_ptr;
00050 typedef TAO_Pseudo_Var_T<Object> Object_var;
00051 typedef TAO_Pseudo_Out_T<Object> Object_out;
00052 }
00053
00054 namespace TAO
00055 {
00056 class Argument;
00057 }
00058
00059 typedef void (*TAO_Skeleton)(
00060 TAO_ServerRequest &,
00061 void *,
00062 void *
00063 #if !defined (TAO_HAS_EXCEPTIONS) || defined (ACE_ENV_BKWD_COMPAT)
00064 , CORBA::Environment &
00065 #endif
00066 );
00067
00068 typedef void (*TAO_Collocated_Skeleton)(
00069 TAO_Abstract_ServantBase *,
00070 TAO::Argument **,
00071 int
00072 #if !defined (TAO_HAS_EXCEPTIONS) || defined (ACE_ENV_BKWD_COMPAT)
00073 , CORBA::Environment &
00074 #endif
00075 );
00076
00077 class TAO_Export TAO_Abstract_ServantBase
00078 {
00079 public:
00080
00081 virtual ~TAO_Abstract_ServantBase (void);
00082
00083
00084 virtual CORBA::Boolean _is_a (const char* logical_type_id
00085 ACE_ENV_ARG_DECL) = 0;
00086
00087
00088 virtual CORBA::Boolean _non_existent (
00089 ACE_ENV_SINGLE_ARG_DECL) = 0;
00090
00091
00092 virtual CORBA::InterfaceDef_ptr _get_interface (
00093 ACE_ENV_SINGLE_ARG_DECL
00094 ) = 0;
00095
00096
00097 virtual CORBA::Object_ptr _get_component (
00098 ACE_ENV_SINGLE_ARG_DECL) = 0;
00099
00100
00101 virtual char * _repository_id (
00102 ACE_ENV_SINGLE_ARG_DECL) = 0;
00103
00104
00105
00106
00107
00108
00109 virtual void _add_ref (
00110 ACE_ENV_SINGLE_ARG_DECL) = 0;
00111
00112
00113
00114
00115
00116
00117 virtual void _remove_ref (
00118 ACE_ENV_SINGLE_ARG_DECL) = 0;
00119
00120
00121 virtual CORBA::ULong _refcount_value (
00122 ACE_ENV_SINGLE_ARG_DECL) const = 0;
00123
00124
00125
00126 virtual TAO_Stub *_create_stub (ACE_ENV_SINGLE_ARG_DECL) = 0;
00127
00128
00129
00130 virtual int _find (const char *opname,
00131 TAO_Skeleton &skelfunc,
00132 const size_t length = 0) = 0;
00133
00134
00135
00136
00137 virtual int _find (const char *opname,
00138 TAO_Collocated_Skeleton &skelfunc,
00139 TAO::Collocation_Strategy s,
00140 const size_t length = 0) = 0;
00141
00142 protected:
00143
00144
00145 TAO_Abstract_ServantBase (void);
00146
00147
00148 TAO_Abstract_ServantBase (const TAO_Abstract_ServantBase &);
00149
00150
00151 TAO_Abstract_ServantBase &operator= (const TAO_Abstract_ServantBase &);
00152
00153
00154
00155
00156
00157
00158
00159
00160 virtual void _dispatch (TAO_ServerRequest &request,
00161 void *servant_upcall
00162 ACE_ENV_ARG_DECL) = 0;
00163
00164 virtual void synchronous_upcall_dispatch (TAO_ServerRequest &req,
00165 void *servant_upcall,
00166 void *derived_this
00167 ACE_ENV_ARG_DECL) = 0;
00168
00169
00170 virtual const char *_interface_repository_id (void) const = 0;
00171
00172 };
00173
00174 TAO_END_VERSIONED_NAMESPACE_DECL
00175
00176 #include "ace/post.h"
00177
00178 #endif