#include <CEC_DynamicImplementation.h>
Collaboration diagram for TAO_CEC_DynamicImplementationServer:

Public Member Functions | |
| TAO_CEC_DynamicImplementationServer (PortableServer::POA_ptr poa, TAO_CEC_TypedProxyPushConsumer *typed_pp_consumer, TAO_CEC_TypedEventChannel *typed_event_channel) | |
| virtual | ~TAO_CEC_DynamicImplementationServer (void) |
| virtual void | invoke (CORBA::ServerRequest_ptr request) throw (CORBA::SystemException) |
| virtual CORBA::RepositoryId | _primary_interface (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa) throw () |
| virtual PortableServer::POA_ptr | _default_POA () |
| virtual void | is_a (CORBA::ServerRequest_ptr request) |
Private Attributes | |
| PortableServer::POA_var | poa_ |
| TAO_CEC_TypedProxyPushConsumer * | typed_pp_consumer_ |
| TAO_CEC_TypedEventChannel * | typed_event_channel_ |
| CORBA::RepositoryId | repository_id_ |
|
||||||||||||||||
|
Definition at line 9 of file CEC_DynamicImplementation.i.
00012 : poa_ (PortableServer::POA::_duplicate (poa)), 00013 typed_pp_consumer_ (typed_pp_consumer), 00014 typed_event_channel_ (typed_event_channel), 00015 repository_id_ (CORBA::string_dup (typed_event_channel->supported_interface () )) 00016 { 00017 } |
|
|
Definition at line 18 of file CEC_DynamicImplementation.cpp.
00019 {
00020 }
|
|
|
Definition at line 84 of file CEC_DynamicImplementation.cpp.
00085 {
00086 return PortableServer::POA::_duplicate (this->poa_.in ());
00087 }
|
|
||||||||||||
|
Definition at line 75 of file CEC_DynamicImplementation.cpp. References CORBA::string_dup().
00079 {
00080 return CORBA::string_dup (repository_id_);
00081 }
|
|
|
Definition at line 24 of file CEC_DynamicImplementation.cpp. References ACE_CHECK, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_TEXT(), LM_DEBUG, ACE_OS::strcmp(), and TAO_debug_level.
00027 {
00028 // Trap the _is_a request
00029 if (ACE_OS::strcmp ("_is_a", request->operation () ) == 0)
00030 {
00031 this->is_a (request ACE_ENV_ARG_PARAMETER);
00032 ACE_CHECK;
00033 }
00034 else
00035 {
00036 CORBA::NVList_ptr list;
00037
00038 // Get the operation paramter information from the IFR cache.
00039 TAO_CEC_Operation_Params *oper_params =
00040 this->typed_event_channel_->find_from_ifr_cache (request->operation () );
00041
00042 if (oper_params == 0)
00043 {
00044 if (TAO_debug_level >= 10)
00045 {
00046 ACE_DEBUG ((LM_DEBUG,
00047 ACE_TEXT ("***** Operation not found in IFR cache *****\n")));
00048 }
00049
00050 this->typed_event_channel_->create_list (0, list ACE_ENV_ARG_PARAMETER);
00051 ACE_CHECK;
00052 }
00053 else
00054 {
00055 // Populate the NVList from the parameter information.
00056 this->typed_event_channel_->create_operation_list (oper_params, list
00057 ACE_ENV_ARG_PARAMETER);
00058 ACE_CHECK;
00059
00060 // Get the operation arguments. This ahould demarshal correctly.
00061 request->arguments (list ACE_ENV_ARG_PARAMETER);
00062 ACE_CHECK;
00063
00064 // Populate the TypedEvent with the list and operation name.
00065 TAO_CEC_TypedEvent typed_event (list, request->operation () );
00066
00067 // Pass the TypedEvent to the TypedProxyPushConsumer
00068 this->typed_pp_consumer_->invoke (typed_event ACE_ENV_ARG_PARAMETER);
00069 ACE_CHECK;
00070 }
00071 }
00072 }
|
|
|
Definition at line 90 of file CEC_DynamicImplementation.cpp. References ACE_CHECK, ACE_DEBUG, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TEXT(), TAO_CEC_TypedEventChannel::create_list(), LM_DEBUG, TAO_CEC_TypedEventChannel::number_of_base_interfaces(), ACE_OS::strcmp(), TAO_debug_level, and typed_event_channel_.
00092 {
00093 CORBA::NVList_ptr list;
00094
00095 this->typed_event_channel_->create_list (0, list ACE_ENV_ARG_PARAMETER);
00096 ACE_CHECK;
00097
00098 CORBA::Any any_1;
00099 any_1._tao_set_typecode(CORBA::_tc_string);
00100
00101 list->add_value ("value",
00102 any_1,
00103 CORBA::ARG_IN
00104 ACE_ENV_ARG_PARAMETER);
00105 ACE_CHECK;
00106
00107 request->arguments (list
00108 ACE_ENV_ARG_PARAMETER);
00109 ACE_CHECK;
00110
00111 CORBA::NamedValue_ptr nv = list->item (0 ACE_ENV_ARG_PARAMETER);
00112 ACE_CHECK;
00113
00114 CORBA::Any_ptr ap = nv->value ();
00115 const char *value;
00116 *ap >>= value;
00117
00118 if (TAO_debug_level >= 10)
00119 {
00120 ACE_DEBUG ((LM_DEBUG,
00121 ACE_TEXT ("***** TAO_CEC_DynamicImplementationServer::is_a called with value %s *****\n"),
00122 value));
00123 }
00124
00125 const char *object_id =
00126 CORBA::_tc_Object->id (ACE_ENV_SINGLE_ARG_PARAMETER);
00127 ACE_CHECK;
00128
00129 if (TAO_debug_level >= 10)
00130 {
00131 ACE_DEBUG ((LM_DEBUG,
00132 ACE_TEXT ("***** is_a using Server's RepositoryId %s *****\n"),
00133 this->repository_id_));
00134 ACE_DEBUG ((LM_DEBUG,
00135 ACE_TEXT ("***** is_a using base interface %s *****\n"),
00136 object_id));
00137 }
00138
00139 CORBA::Boolean result = 0;
00140 if (ACE_OS::strcmp (value, this->repository_id_) == 0
00141 || ACE_OS::strcmp (value, object_id) == 0)
00142 {
00143 result = 1;
00144 }
00145 else
00146 {
00147 CORBA::ULong num = this->typed_event_channel_->number_of_base_interfaces ();
00148 for (CORBA::ULong base=0; base<num; base++)
00149 {
00150 if (TAO_debug_level >= 10)
00151 {
00152 ACE_DEBUG ((LM_DEBUG,
00153 ACE_TEXT ("***** is_a using base interface %s *****\n"),
00154 this->typed_event_channel_->base_interfaces (base) ));
00155 }
00156
00157 if (ACE_OS::strcmp (value, this->typed_event_channel_->base_interfaces (base) ) == 0)
00158 {
00159 result = 1;
00160 }
00161 }
00162 }
00163
00164 if (TAO_debug_level >= 10)
00165 {
00166 ACE_DEBUG ((LM_DEBUG,
00167 ACE_TEXT ("***** is_a returning %d *****\n"),
00168 result));
00169 }
00170
00171 CORBA::Any result_any;
00172 CORBA::Any::from_boolean from_boolean (result);
00173 result_any <<= from_boolean;
00174
00175 request->set_result (result_any ACE_ENV_ARG_PARAMETER);
00176 ACE_CHECK;
00177 }
|
|
|
Definition at line 66 of file CEC_DynamicImplementation.h. |
|
|
Definition at line 75 of file CEC_DynamicImplementation.h. |
|
|
Definition at line 72 of file CEC_DynamicImplementation.h. Referenced by is_a(). |
|
|
Definition at line 69 of file CEC_DynamicImplementation.h. |
1.3.6