summaryrefslogtreecommitdiff
path: root/modules/CIAO/connectors/AMI_CCM/AMI/AMI_exec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/CIAO/connectors/AMI_CCM/AMI/AMI_exec.cpp')
-rw-r--r--modules/CIAO/connectors/AMI_CCM/AMI/AMI_exec.cpp231
1 files changed, 231 insertions, 0 deletions
diff --git a/modules/CIAO/connectors/AMI_CCM/AMI/AMI_exec.cpp b/modules/CIAO/connectors/AMI_CCM/AMI/AMI_exec.cpp
new file mode 100644
index 00000000000..fe0a0bfae0a
--- /dev/null
+++ b/modules/CIAO/connectors/AMI_CCM/AMI/AMI_exec.cpp
@@ -0,0 +1,231 @@
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler v1.7.1 ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
+// and
+// Institute for Software Integrated Systems
+// Vanderbilt University
+// Nashville, TN
+// USA
+// http://www.isis.vanderbilt.edu/
+//
+// Information about TAO is available at:
+// http://www.cs.wustl.edu/~schmidt/TAO.html
+
+// TAO_IDL - Generated from
+// be/be_codegen.cpp:1278
+
+#include "AMI_exec.h"
+#include "ciao/CIAO_common.h"
+
+namespace CIAO_Hello_AMI_AMI_Impl
+{
+ ami_handler::ami_handler (
+ ::CCM_AMI::Cookie ck,
+ const char * in_str,
+ ::CCM_AMI::AMI_foo_ptr foo_receiver,
+ ::CCM_AMI::AMI_foo_callback_ptr foo_callback) :
+ ck_ (ck),
+ in_str_ (in_str),
+ foo_receiver_ (::CCM_AMI::AMI_foo::_duplicate (foo_receiver)),
+ foo_callback_ (::CCM_AMI::AMI_foo_callback::_duplicate (foo_callback))
+ {
+ }
+
+ ami_handler::~ami_handler ()
+ {
+ printf ("AMI :\tami_handler::~ami_handler\n");
+ }
+
+ int ami_handler::svc ()
+ {
+ char* out_str;
+ long result;
+ printf ("AMI :\tThread started for cookie <%ld> sending string <%s>\n", ck_, in_str_);
+ result = foo_receiver_->asynch_foo (CORBA::string_dup (in_str_), out_str);
+ printf ("AMI :\tCookie <%ld> received : result <%ld> answer <%s>\n",
+ ck_, result, out_str);
+ foo_callback_->foo_callback_handler (ck_, result, CORBA::string_dup (out_str));
+
+ return 0;
+ }
+
+ //============================================================
+ // Facet Executor Implementation Class: AMI_ami_foo_exec_i
+ //============================================================
+
+ AMI_ami_foo_exec_i::AMI_ami_foo_exec_i (
+ ::CCM_AMI::AMI_foo_ptr foo_receiver,
+ ::CCM_AMI::AMI_foo_callback_ptr foo_callback) :
+ foo_receiver_ (::CCM_AMI::AMI_foo::_duplicate (foo_receiver)),
+ foo_callback_ (::CCM_AMI::AMI_foo_callback::_duplicate (foo_callback)),
+ cookie_ (0)
+ {
+ }
+
+ AMI_ami_foo_exec_i::~AMI_ami_foo_exec_i (void)
+ {
+ printf ("AMI :\tAMI_ami_foo_exec_i::~AMI_ami_foo_exec_i\n");
+ }
+
+ // Operations from ::CCM_AMI::AMI_ami_foo
+
+ ::CCM_AMI::Cookie
+ AMI_ami_foo_exec_i::sendc_asynch_foo (
+ const char * in_str)
+ {
+ ::CCM_AMI::Cookie ck = ++cookie_;
+ printf ("AMI :\tReceived string <%s> for <%d>\n", in_str, ck);
+ ami_handler* ah = new ami_handler (ck, in_str, foo_receiver_, foo_callback_);
+ ah->activate ();
+ return ck;
+ }
+
+ //============================================================
+ // Component Executor Implementation Class: AMI_exec_i
+ //============================================================
+
+ AMI_exec_i::AMI_exec_i (void)
+ {
+ }
+
+ AMI_exec_i::~AMI_exec_i (void)
+ {
+ }
+
+ // Supported operations and attributes.
+
+ // Component attributes.
+
+ // Port operations.
+
+ ::CCM_AMI::CCM_AMI_ami_foo_ptr
+ AMI_exec_i::get_perform_asynch_foo (void)
+ {
+ ::CCM_AMI::AMI_foo_var receiver_foo =
+ this->context_->get_connection_receiver_foo ();
+
+ ::CCM_AMI::AMI_foo_callback_var foo_callback =
+ this->context_->get_connection_callback_foo ();
+
+ return new AMI_ami_foo_exec_i (receiver_foo, foo_callback);
+ }
+
+ // Operations from Components::SessionComponent.
+
+ void
+ AMI_exec_i::set_session_context (
+ ::Components::SessionContext_ptr ctx)
+ {
+ this->context_ =
+ ::Hello_AMI::CCM_AMI_Context::_narrow (ctx);
+
+ if ( ::CORBA::is_nil (this->context_.in ()))
+ {
+ throw ::CORBA::INTERNAL ();
+ }
+ }
+
+ void
+ AMI_exec_i::configuration_complete (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ AMI_exec_i::ccm_activate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ AMI_exec_i::ccm_passivate (void)
+ {
+ /* Your code here. */
+ }
+
+ void
+ AMI_exec_i::ccm_remove (void)
+ {
+ /* Your code here. */
+ }
+
+ extern "C" ::Components::EnterpriseComponent_ptr
+ create_Hello_AMI_AMI_Impl (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_RETURN (
+ retval,
+ AMI_exec_i,
+ ::Components::EnterpriseComponent::_nil ());
+
+ return retval;
+ }
+}
+
+namespace CIAO_Hello_AMI_AMI_Impl
+{
+ //============================================================
+ // Home Executor Implementation Class: AMIHome_exec_i
+ //============================================================
+
+ AMIHome_exec_i::AMIHome_exec_i (void)
+ {
+ }
+
+ AMIHome_exec_i::~AMIHome_exec_i (void)
+ {
+ }
+
+ // All operations and attributes.
+
+ // Factory operations.
+
+ // Finder operations.
+
+ // Implicit operations.
+
+ ::Components::EnterpriseComponent_ptr
+ AMIHome_exec_i::create (void)
+ {
+ ::Components::EnterpriseComponent_ptr retval =
+ ::Components::EnterpriseComponent::_nil ();
+
+ ACE_NEW_THROW_EX (
+ retval,
+ AMI_exec_i,
+ ::CORBA::NO_MEMORY ());
+
+ return retval;
+ }
+
+ extern "C" ::Components::HomeExecutorBase_ptr
+ create_Hello_AMI_AMIHome_Impl (void)
+ {
+ ::Components::HomeExecutorBase_ptr retval =
+ ::Components::HomeExecutorBase::_nil ();
+
+ ACE_NEW_RETURN (
+ retval,
+ AMIHome_exec_i,
+ ::Components::HomeExecutorBase::_nil ());
+
+ return retval;
+ }
+}
+