summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-03-27 18:52:05 +0000
committerdengg <dengg@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2006-03-27 18:52:05 +0000
commitfe1ddf55b2b73fc2e958b9abf5177d646db1c450 (patch)
tree44ec4dde3027028cd9f1b3178920fd7938397433
parent026710d4bea2bbef2ed98daf9c3aa0eff69e2983 (diff)
downloadATCD-fe1ddf55b2b73fc2e958b9abf5177d646db1c450.tar.gz
.
-rw-r--r--TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp83
-rw-r--r--TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp129
-rw-r--r--TAO/CIAO/ciao/CCM_Event.idl10
-rw-r--r--TAO/CIAO/ciao/Deployment_Core.idl2
-rw-r--r--TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp200
-rw-r--r--TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h4
-rw-r--r--TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl2
-rw-r--r--TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp3
8 files changed, 296 insertions, 137 deletions
diff --git a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
index 606e6ad22b9..d6570cc6cfa 100644
--- a/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
+++ b/TAO/CIAO/DAnCE/DomainApplicationManager/DomainApplicationManager_Impl.cpp
@@ -1168,6 +1168,8 @@ get_outgoing_connections (const Deployment::DeploymentPlan &plan,
return connections._retn ();
}
+
+// Get outgoing connections for particular instance
bool
CIAO::DomainApplicationManager_Impl::
get_outgoing_connections_i (const char * instname,
@@ -1207,6 +1209,8 @@ get_outgoing_connections_i (const char * instname,
return true;
}
+// Search the current binding to see whether a connection of this
+// component needs to be populated
bool
CIAO::DomainApplicationManager_Impl::
populate_connection_for_binding (
@@ -1268,16 +1272,10 @@ handle_es_connection (
binding.internalEndpoint[0];
// If the instance name does NOT match one of the names in the binding
+ // Then thsi binding has nothing related to myself (an instance)
if (ACE_OS::strcmp (instname,
plan.instance[endpoint.instanceRef].name.in ()) != 0)
- {
- ACE_ERROR ((LM_ERROR,
- "DAnCE (%P|%t) DomainApplicationManager_Impl.cpp -"
- "CIAO::DomainApplicationManager_Impl::"
- "handle_publisher_es_connection -"
- "invalid connection specified in deployment plan\n"));
- return false;
- }
+ return false;
if (binding.externalReference.length () != 1)
{
@@ -1289,15 +1287,19 @@ handle_es_connection (
return false;
}
+ retv.length (len+1);
retv[len].instanceName = instname;
- retv[len].portName = binding.internalEndpoint[0].portName.in ();
- retv[len].kind = binding.internalEndpoint[0].kind;
-
- CIAO::CIAO_Event_Service_var es;
+ retv[len].portName = endpoint.portName.in ();
+ retv[len].kind = endpoint.kind;
ACE_CString es_id = binding.externalReference[0].location.in ();
+ retv[len].endpointInstanceName = es_id.c_str ();
+ retv[len].endpointPortName = "CIAO_ES";
+
// If we didnt find the objref of the connection ...
+ CIAO::CIAO_Event_Service_var es;
+
if (this->es_map_.find (es_id.c_str (), es) != 0)
{
ACE_CString error ("Creating connections for ");
@@ -1311,6 +1313,43 @@ handle_es_connection (
}
retv[len].event_service = es._retn ();
+
+ // One more thing needs to be done if this is a es_consumer connection
+ if (endpoint.kind == Deployment::rtecEventConsumer)
+ {
+ // Now we search in the received connections to get the objRef of event sink
+ bool found = false;
+ const CORBA::ULong all_conn_len = this->all_connections_->length ();
+ for (CORBA::ULong j = 0; j < all_conn_len; ++j)
+ {
+ const Deployment::Connection & curr_recv_conn =
+ this->all_connections_[j];
+
+ // We need to look at the instance name and the port name to confirm.
+ if (ACE_OS::strcmp (curr_recv_conn.instanceName.in (),
+ instname) == 0 &&
+ ACE_OS::strcmp (curr_recv_conn.portName.in (),
+ endpoint.portName.in ()) == 0)
+ {
+ retv[len].endpoint =
+ CORBA::Object::_duplicate(curr_recv_conn.endpoint.in ());
+ found = true;
+ }
+ } // End of searching received connections
+
+ if (!found)
+ {
+ ACE_CString error ("Creating connections for ");
+ error += instname;
+ error += ": unable to find object reference for connection ";
+ error += binding.name.in ();
+ ACE_THROW_RETURN (Deployment::StartError
+ ("DomainApplicationManager_Impl::handle_es_connection",
+ error.c_str ()),
+ false);
+ }
+ }
+
return true;
}
@@ -1816,10 +1855,28 @@ dump_connections (const ::Deployment::Connections & connections)
ACE_DEBUG ((LM_DEBUG, "EventConsumer\n"));
break;
+ case Deployment::rtecEventPublisher:
+
+ ACE_DEBUG ((LM_DEBUG, "rtecEventPublisher\n"));
+ break;
+
+ case Deployment::rtecEventConsumer:
+
+ ACE_DEBUG ((LM_DEBUG, "rtecEventConsumer\n"));
+ break;
+
default:
ACE_DEBUG ((LM_DEBUG, "Unknown port kind.\n"));
-
}
+
+ ACE_DEBUG ((LM_DEBUG,
+ "endpointInstanceName: %s\n",
+ connections[i].endpointInstanceName.in ()));
+
+ ACE_DEBUG ((LM_DEBUG,
+ "endpointPortName: %s\n",
+ connections[i].endpointPortName.in ()));
+ ACE_DEBUG ((LM_DEBUG, "---------------------\n"));
}
}
diff --git a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
index 3ecf25cf581..40c96f3095d 100644
--- a/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
+++ b/TAO/CIAO/DAnCE/NodeApplication/NodeApplication_Impl.cpp
@@ -587,7 +587,7 @@ handle_facet_receptable_connection (
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::InvalidConnection))
{
- if (CIAO::debug_level () > 6)
+ if (CIAO::debug_level () > 11)
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -606,7 +606,10 @@ handle_facet_receptable_connection (
ACE_TRY_CHECK;
ACE_CString key = (*create_connection_key (connection));
- ACE_DEBUG ((LM_ERROR, "[BINDING KEY]: %s\n", key.c_str ()));
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_ERROR, "[BINDING KEY]: %s\n", key.c_str ()));
+ }
this->cookie_map_.rebind (key, cookie);
if (CIAO::debug_level () > 6)
@@ -625,7 +628,10 @@ handle_facet_receptable_connection (
{
ACE_CString key = (*create_connection_key (connection));
::Components::Cookie_var cookie;
- ACE_DEBUG ((LM_ERROR, "[FINDING KEY]: %s\n", key.c_str ()));
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_ERROR, "[FINDING KEY]: %s\n", key.c_str ()));
+ }
if (this->cookie_map_.find (key, cookie) != 0)
{
ACE_DEBUG ((LM_ERROR, "Error: Cookie Not Found!\n"));
@@ -676,7 +682,7 @@ handle_emitter_consumer_connection (
ACE_TRY_THROW (Deployment::InvalidConnection ());
}
- if (CIAO::debug_level () > 6)
+ if (CIAO::debug_level () > 11)
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -754,7 +760,7 @@ handle_publisher_consumer_connection (
ACE_TRY_THROW (Deployment::InvalidConnection ());
}
- if (CIAO::debug_level () > 6)
+ if (CIAO::debug_level () > 11)
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -774,8 +780,6 @@ handle_publisher_consumer_connection (
ACE_CString key = (*create_connection_key (connection));
this->cookie_map_.rebind (key, cookie);
- ACE_DEBUG ((LM_ERROR, "[BINDING KEY]: %s\n", key.c_str ()));
-
if (CIAO::debug_level () > 6)
{
ACE_DEBUG ((LM_DEBUG,
@@ -792,7 +796,11 @@ handle_publisher_consumer_connection (
{
ACE_CString key = (*create_connection_key (connection));
::Components::Cookie_var cookie;
- ACE_DEBUG ((LM_ERROR, "[FINDING KEY]: %s\n", key.c_str ()));
+
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_ERROR, "[FINDING KEY]: %s\n", key.c_str ()));
+ }
if (this->cookie_map_.find (key, cookie) != 0)
{
ACE_DEBUG ((LM_ERROR, "Error: Cookie Not Found!\n"));
@@ -829,7 +837,7 @@ handle_publisher_es_connection (
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::InvalidConnection))
{
- if (connection.type != CIAO::RTEC)
+ if (connection.kind != Deployment::rtecEventPublisher)
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -855,10 +863,13 @@ handle_publisher_es_connection (
if (add_connection)
{
- // Cache the ES into component servant
+ ::Components::Cookie_var cookie =
comp->ciao_connect_es (connection.portName.in (),
event_service);
+ ACE_CString key = (*create_connection_key (connection));
+ this->cookie_map_.rebind (key, cookie);
+
// Create a supplier_config and register it to ES
CIAO::Supplier_Config_var supplier_config =
event_service->create_supplier_config ();
@@ -866,19 +877,50 @@ handle_publisher_es_connection (
supplier_config->supplier_id (sid.c_str ());
event_service->connect_event_supplier (supplier_config.in ());
supplier_config->destroy ();
+
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
+ "CIAO::NodeApplication_Impl::handle_publisher_es_connection\n"
+ "[INSTANCE:PORT] : [%s:%s] --> [%s:%s] connected.\n",
+ connection.instanceName.in (),
+ connection.portName.in (),
+ connection.endpointInstanceName.in (),
+ connection.endpointPortName.in ()));
+ }
}
else // remove the connection
{
- // @@@
- // comp->ciao_disconnect_es (connection.portName.in (),
- // event_service);
- ACE_DEBUG ((LM_DEBUG,
- "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
- "CIAO::NodeApplication_Impl::handle_publisher_es_connection: "
- "[%s : %s] publisher port disconnected from ciao event service. \n",
- connection.instanceName.in (),
- connection.portName.in ()));
+ ACE_CString key = (*create_connection_key (connection));
+ ::Components::Cookie_var cookie;
+
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_ERROR, "[FINDING KEY]: %s\n", key.c_str ()));
+ }
+ if (this->cookie_map_.find (key, cookie) != 0)
+ {
+ ACE_DEBUG ((LM_ERROR, "Error: Cookie Not Found!\n"));
+ ACE_TRY_THROW (Deployment::InvalidConnection ());
+ }
+
+ comp->ciao_disconnect_es (connection.portName.in (),
+ cookie.in ());
+ this->cookie_map_.unbind (key);
event_service->disconnect_event_supplier (sid.c_str ());
+
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
+ "CIAO::NodeApplication_Impl::handle_publisher_es_connection\n"
+ "[INSTANCE:PORT] : [%s:%s] --> [%s:%s] disconnected.\n",
+ connection.instanceName.in (),
+ connection.portName.in (),
+ connection.endpointInstanceName.in (),
+ connection.endpointPortName.in ()));
+ }
}
}
@@ -891,7 +933,7 @@ handle_es_consumer_connection (
ACE_THROW_SPEC ((CORBA::SystemException,
Deployment::InvalidConnection))
{
- if (connection.type != CIAO::RTEC)
+ if (connection.kind != Deployment::rtecEventConsumer)
{
ACE_DEBUG ((LM_DEBUG,
"CIAO (%P|%t) - NodeApplication_Impl.cpp, "
@@ -906,17 +948,23 @@ handle_es_consumer_connection (
if (CORBA::is_nil (event_service))
{
- ACE_DEBUG ((LM_DEBUG, "Nil event_service\n"));
+ ACE_DEBUG ((LM_ERROR,
+ "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
+ "CIAO::NodeApplication_Impl::handle_es_consumer_connection: "
+ "NIL event_service\n"));
ACE_THROW (Deployment::InvalidConnection ());
}
- // Get consumer object
+ // Get consumer object
Components::EventConsumerBase_var consumer =
Components::EventConsumerBase::_narrow (connection.endpoint.in ());
if (CORBA::is_nil (consumer.in ()))
{
- ACE_DEBUG ((LM_DEBUG, "Nil consumer port object reference\n"));
+ ACE_DEBUG ((LM_ERROR,
+ "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
+ "CIAO::NodeApplication_Impl::handle_es_consumer_connection: "
+ "Nil consumer port object reference\n"));
ACE_THROW (Deployment::InvalidConnection ());
}
@@ -937,26 +985,45 @@ handle_es_consumer_connection (
CIAO::Consumer_Config_var consumer_config =
event_service->create_consumer_config ();
- //consumer_config->supplier_id ("dummy");
- consumer_config->supplier_id (sid.c_str ());
+ consumer_config->supplier_id ("Hello-Sender-idd_click_out_publisher");
+ //consumer_config->supplier_id (sid.c_str ());
consumer_config->consumer_id (cid.c_str ());
consumer_config->consumer (consumer.in ());
event_service->connect_event_consumer (consumer_config.in ());
consumer_config->destroy ();
+
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
+ "CIAO::NodeApplication_Impl::handle_es_consumer_connection\n"
+ "[INSTANCE:PORT] : [%s:%s] --> [%s:%s] connected.\n",
+ connection.endpointInstanceName.in (),
+ connection.endpointPortName.in (),
+ connection.instanceName.in (),
+ connection.portName.in ()));
+ }
}
else // remove the connection
{
- ACE_DEBUG ((LM_DEBUG,
- "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
- "CIAO::NodeApplication_Impl::handle_es_consumer_connection: "
- "[%s : %s] consumer port disconnected from ciao event service. \n",
- connection.instanceName.in (),
- connection.portName.in ()));
event_service->disconnect_event_consumer (cid.c_str ());
+
+ if (CIAO::debug_level () > 6)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "CIAO (%P|%t) - NodeApplication_Impl.cpp, "
+ "CIAO::NodeApplication_Impl::handle_es_consumer_connection\n"
+ "[INSTANCE:PORT] : [%s:%s] --> [%s:%s] disconnected.\n",
+ connection.endpointInstanceName.in (),
+ connection.endpointPortName.in (),
+ connection.instanceName.in (),
+ connection.portName.in ()));
+ }
}
}
+// Below code is not used at this time.
void
CIAO::NodeApplication_Impl::build_event_connection (
const Deployment::Connection & connection,
diff --git a/TAO/CIAO/ciao/CCM_Event.idl b/TAO/CIAO/ciao/CCM_Event.idl
index 6f322c55690..73804f53aba 100644
--- a/TAO/CIAO/ciao/CCM_Event.idl
+++ b/TAO/CIAO/ciao/CCM_Event.idl
@@ -89,11 +89,11 @@ module Components
InvalidConnection,
ExceededConnectionLimit);
- //Object
- //ciao_disconnect_es (in FeatureName publisher_name,
- // in Cookie ck)
- // raises (InvalidName,
- // InvalidConnection);
+ Object
+ ciao_disconnect_es (in FeatureName publisher_name,
+ in Cookie ck)
+ raises (InvalidName,
+ InvalidConnection);
void connect_consumer (in FeatureName emitter_name,
in EventConsumerBase consumer)
diff --git a/TAO/CIAO/ciao/Deployment_Core.idl b/TAO/CIAO/ciao/Deployment_Core.idl
index e6423b406a5..a49164b487a 100644
--- a/TAO/CIAO/ciao/Deployment_Core.idl
+++ b/TAO/CIAO/ciao/Deployment_Core.idl
@@ -102,8 +102,6 @@ module Deployment
// A wrapper facade interface to provision different event
// communication mechanisms, including RTEC, etc.
CIAO::CIAO_Event_Service event_service;
-
- CIAO::EventServiceType type;
};
typedef sequence < Connection > Connections;
diff --git a/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp b/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp
index bce61f11a33..e59abbe37ef 100644
--- a/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp
+++ b/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.cpp
@@ -161,6 +161,8 @@ namespace CIAO
//@@@
rt_config->start_disjunction_group (1);
+ rt_config->insert_type (ACE_ES_EVENT_ANY);
+
RtecEventChannelAdmin::ConsumerQOS_var qos =
rt_config->rt_event_qos (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
@@ -225,10 +227,7 @@ namespace CIAO
events[0].header.source = ACE_ES_EVENT_SOURCE_ANY; //this->source_id_;
events[0].header.type = ACE_ES_EVENT_ANY; //this->type_id_;
events[0].data.any_value <<= ev;
- /**
- * @@George, a place holder for reliable oneways if we get to
- * support it.
- */
+
this->proxy_consumer_->push (events ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -255,6 +254,10 @@ namespace CIAO
}
+ //////////////////////////////////////////////////////////////////////
+ /// Supplier Servant Implementation
+ //////////////////////////////////////////////////////////////////////
+
RTEventServiceSupplier_impl::RTEventServiceSupplier_impl (
PortableServer::POA_ptr poa) :
poa_ (PortableServer::POA::_duplicate (poa))
@@ -271,6 +274,10 @@ namespace CIAO
this->_remove_ref ();
}
+ //////////////////////////////////////////////////////////////////////
+ /// Consumer Servant Implementation
+ //////////////////////////////////////////////////////////////////////
+
RTEventServiceConsumer_impl::RTEventServiceConsumer_impl (
PortableServer::POA_ptr poa,
Components::EventConsumerBase_ptr consumer) :
@@ -310,6 +317,92 @@ namespace CIAO
this->_remove_ref ();
}
+
+ //////////////////////////////////////////////////////////////////////
+ /// Supplier Config Implementation
+ //////////////////////////////////////////////////////////////////////
+
+ RTEvent_Supplier_Config_impl::RTEvent_Supplier_Config_impl (PortableServer::POA_ptr poa) :
+ service_type_ (RTEC),
+ poa_ (PortableServer::POA::_duplicate (poa))
+ {
+ }
+
+ RTEvent_Supplier_Config_impl::~RTEvent_Supplier_Config_impl (void)
+ {
+ ACE_DEBUG
+ ((LM_DEBUG, "RTEvent_Supplier_Config_impl::~RTEvent_Supplier_Config_impl\n"));
+ }
+
+ void
+ RTEvent_Supplier_Config_impl::supplier_id (
+ const char * supplier_id
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException))
+ {
+ ACE_DEBUG ((LM_DEBUG, "supplier's id: %s\n", supplier_id));
+
+ this->supplier_id_ = supplier_id;
+
+ ACE_Hash<ACE_CString> hasher;
+ RtecEventComm::EventSourceID source_id =
+ hasher (this->supplier_id_.c_str ());
+
+ ACE_DEBUG ((LM_DEBUG, "supplier's source id: %i\n", source_id));
+
+ this->qos_.insert (source_id,
+ source_id,
+ 0,
+ 1);
+ }
+
+ CONNECTION_ID
+ RTEvent_Supplier_Config_impl::supplier_id (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException))
+ {
+ return CORBA::string_dup (this->supplier_id_.c_str ());
+ }
+
+ EventServiceType
+ RTEvent_Supplier_Config_impl::service_type (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException))
+ {
+ return this->service_type_;
+ }
+
+ RtecEventChannelAdmin::SupplierQOS *
+ RTEvent_Supplier_Config_impl::rt_event_qos (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException))
+ {
+ RtecEventChannelAdmin::SupplierQOS * supplier_qos = 0;
+ ACE_NEW_RETURN (supplier_qos,
+ RtecEventChannelAdmin::SupplierQOS (this->qos_.get_SupplierQOS ()),
+ 0);
+ return supplier_qos;
+ }
+
+ void
+ RTEvent_Supplier_Config_impl::destroy (
+ ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((
+ CORBA::SystemException))
+ {
+ PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this);
+ this->poa_->deactivate_object (oid);
+ this->_remove_ref ();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ /// Consumer Config Implementation
+ //////////////////////////////////////////////////////////////////////
+
RTEvent_Consumer_Config_impl::RTEvent_Consumer_Config_impl (PortableServer::POA_ptr poa) :
service_type_ (RTEC),
poa_ (PortableServer::POA::_duplicate (poa))
@@ -353,9 +446,18 @@ namespace CIAO
RtecEventComm::EventSourceID int_source_id =
hasher (source_id);
- this->qos_.insert (int_source_id,
- int_source_id,
- 0);
+ this->qos_.insert_source (int_source_id,
+ 0);
+ }
+
+ void
+ RTEvent_Consumer_Config_impl::insert_type (
+ ::CORBA::Long event_type
+ ACE_ENV_ARG_DECL)
+ ACE_THROW_SPEC ((::CORBA::SystemException))
+ {
+ this->qos_.insert_type (event_type,
+ 0);
}
void
@@ -366,7 +468,9 @@ namespace CIAO
CORBA::SystemException))
{
- ACE_DEBUG ((LM_DEBUG, "RTEvent_Consumer_Config_impl::set_consumer_id\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ "RTEvent_Consumer_Config_impl::set_consumer_id:%s\n",
+ consumer_id));
this->consumer_id_ = consumer_id;
}
@@ -379,7 +483,9 @@ namespace CIAO
CORBA::SystemException))
{
- ACE_DEBUG ((LM_DEBUG, "RTEvent_Consumer_Config_impl::set_supplier_id\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ "RTEvent_Consumer_Config_impl::set_supplier_id:%s\n",
+ supplier_id));
this->supplier_id_ = supplier_id;
@@ -476,80 +582,4 @@ namespace CIAO
this->poa_->deactivate_object (oid);
this->_remove_ref ();
}
-
- RTEvent_Supplier_Config_impl::RTEvent_Supplier_Config_impl (PortableServer::POA_ptr poa) :
- service_type_ (RTEC),
- poa_ (PortableServer::POA::_duplicate (poa))
- {
- }
-
- RTEvent_Supplier_Config_impl::~RTEvent_Supplier_Config_impl (void)
- {
- ACE_DEBUG
- ((LM_DEBUG, "RTEvent_Supplier_Config_impl::~RTEvent_Supplier_Config_impl\n"));
- }
-
- void
- RTEvent_Supplier_Config_impl::supplier_id (
- const char * supplier_id
- ACE_ENV_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
- {
- this->supplier_id_ = supplier_id;
-
- ACE_Hash<ACE_CString> hasher;
- RtecEventComm::EventSourceID source_id =
- hasher (this->supplier_id_.c_str ());
-
- ACE_DEBUG ((LM_DEBUG, "supplier's source id: %i\n", source_id));
-
- this->qos_.insert (source_id,
- source_id,
- 0,
- 1);
- }
-
- CONNECTION_ID
- RTEvent_Supplier_Config_impl::supplier_id (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
- {
- return CORBA::string_dup (this->supplier_id_.c_str ());
- }
-
- EventServiceType
- RTEvent_Supplier_Config_impl::service_type (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
- {
- return this->service_type_;
- }
-
- RtecEventChannelAdmin::SupplierQOS *
- RTEvent_Supplier_Config_impl::rt_event_qos (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
- {
- RtecEventChannelAdmin::SupplierQOS * supplier_qos = 0;
- ACE_NEW_RETURN (supplier_qos,
- RtecEventChannelAdmin::SupplierQOS (this->qos_.get_SupplierQOS ()),
- 0);
- return supplier_qos;
- }
-
- void
- RTEvent_Supplier_Config_impl::destroy (
- ACE_ENV_SINGLE_ARG_DECL)
- ACE_THROW_SPEC ((
- CORBA::SystemException))
- {
- PortableServer::ObjectId_var oid = this->poa_->servant_to_id (this);
- this->poa_->deactivate_object (oid);
- this->_remove_ref ();
- }
-
}
diff --git a/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h b/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h
index 9c70aaf4e0c..0dfcff1d36d 100644
--- a/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h
+++ b/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.h
@@ -232,6 +232,10 @@ namespace CIAO
virtual void insert_source (const char * source_id ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
+ virtual void insert_type (::CORBA::Long event_type
+ ACE_ENV_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((::CORBA::SystemException));
+
virtual void consumer_id (const char * consumer_id ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
diff --git a/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl b/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl
index 5a58335556a..0c89e3417e8 100644
--- a/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl
+++ b/TAO/CIAO/ciaosvcs/Events/CIAO_RTEC/CIAO_RTEvent.idl
@@ -23,6 +23,8 @@ module CIAO
void insert_source (in CONNECTION_ID source_id);
+ void insert_type (in long event_type);
+
//void start_logical_and_group (in long size);
//void start_negation ();
diff --git a/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp b/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
index f2de3840f79..b2c75e78c02 100644
--- a/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
+++ b/TAO/CIAO/examples/Hello/descriptors_events/flattened_deploymentplan_events.cdp
@@ -118,7 +118,7 @@
</configProperty>
</instance>
-<!--
+
<connection>
<name>hello_facet_connection</name>
<internalEndpoint>
@@ -133,6 +133,7 @@
</internalEndpoint>
</connection>
+<!--
<connection>
<name>hello_event_connection</name>
<internalEndpoint>