summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/examples
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/examples')
-rwxr-xr-xTAO/orbsvcs/examples/Notify/Filter/run_test.pl73
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Consumer.cpp24
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Consumer.h16
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.cpp24
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.h20
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.cpp10
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.h14
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.cpp8
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.h16
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Supplier.cpp22
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Supplier.h16
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp26
-rw-r--r--TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.h20
-rwxr-xr-xTAO/orbsvcs/examples/Notify/Subscribe/run_test.pl73
14 files changed, 254 insertions, 108 deletions
diff --git a/TAO/orbsvcs/examples/Notify/Filter/run_test.pl b/TAO/orbsvcs/examples/Notify/Filter/run_test.pl
new file mode 100755
index 00000000000..0a8753dc3e5
--- /dev/null
+++ b/TAO/orbsvcs/examples/Notify/Filter/run_test.pl
@@ -0,0 +1,73 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../bin";
+use PerlACE::Run_Test;
+
+$experiment_timeout = 60;
+$startup_timeout = 60;
+
+$notify_ior = PerlACE::LocalFile ("notify.ior");
+
+$naming_ior = PerlACE::LocalFile ("naming.ior");
+
+$status = 0;
+
+$Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service",
+ "-o $naming_ior");
+
+$Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service");
+
+$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior ";
+
+$Filter = new PerlACE::Process ("Filter");
+
+$Filter_Args = "-ORBInitRef NameService=file://$naming_ior";
+
+unlink $naming_ior;
+$Naming->Spawn ();
+
+if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the naming service to start\n";
+ $Naming->Kill ();
+ exit 1;
+}
+
+unlink $notify_ior;
+$Notification->Arguments ($Notify_Args);
+$args = $Notification->Arguments ();
+print STDERR "Running Notification with arguments: $args\n";
+$Notification->Spawn ();
+
+if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+}
+
+$Filter->Arguments ($Filter_Args);
+$args = $Filter->Arguments ();
+print STDERR "Running Filter with arguments: $args\n";
+$status = $Filter->SpawnWaitKill ($experiment_timeout);
+
+if ($status != 0)
+ {
+ print STDERR "ERROR: Filter returned $status\n";
+ $Filter->Kill ();
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+ }
+
+$Notification->Kill ();
+unlink $notify_ior;
+
+$Naming->Kill ();
+unlink $naming_ior;
+
+exit $status;
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Consumer.cpp b/TAO/orbsvcs/examples/Notify/Lanes/Consumer.cpp
index 00ec0a92488..1290fd43dfb 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Consumer.cpp
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Consumer.cpp
@@ -2,19 +2,19 @@
#include "Consumer.h"
-ACE_RCSID(Notify, TAO_NS_Consumer, "$id$")
+ACE_RCSID(Notify, TAO_Notify_Lanes_Consumer, "$id$")
-TAO_NS_Consumer::TAO_NS_Consumer (TAO_NS_ORB_Objects& orb_objects)
+TAO_Notify_Lanes_Consumer::TAO_Notify_Lanes_Consumer (TAO_Notify_ORB_Objects& orb_objects)
: orb_objects_ (orb_objects)
{
}
-TAO_NS_Consumer::~TAO_NS_Consumer (void)
+TAO_Notify_Lanes_Consumer::~TAO_Notify_Lanes_Consumer (void)
{
}
void
-TAO_NS_Consumer::init (PortableServer::POA_var& poa, CosNotifyChannelAdmin::ConsumerAdmin_var& admin, ACE_CString& event_type ACE_ENV_ARG_DECL)
+TAO_Notify_Lanes_Consumer::init (PortableServer::POA_var& poa, CosNotifyChannelAdmin::ConsumerAdmin_var& admin, ACE_CString& event_type ACE_ENV_ARG_DECL)
{
this->default_POA_ = poa;
this->admin_ = admin;
@@ -24,19 +24,19 @@ TAO_NS_Consumer::init (PortableServer::POA_var& poa, CosNotifyChannelAdmin::Cons
}
PortableServer::POA_ptr
-TAO_NS_Consumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_Notify_Lanes_Consumer::_default_POA (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
return PortableServer::POA::_duplicate (this->default_POA_.in ());
}
void
-TAO_NS_Consumer::run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+TAO_Notify_Lanes_Consumer::run (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
{
// Nothing to do.
}
void
-TAO_NS_Consumer::connect (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer::connect (ACE_ENV_SINGLE_ARG_DECL)
{
// Activate the consumer with the default_POA_
CosNotifyComm::StructuredPushConsumer_var objref = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -73,14 +73,14 @@ TAO_NS_Consumer::connect (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer::disconnect (ACE_ENV_SINGLE_ARG_DECL)
{
this->proxy_supplier_->disconnect_structured_push_supplier(ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
}
void
-TAO_NS_Consumer::offer_change (const CosNotification::EventTypeSeq & /*added*/,
+TAO_Notify_Lanes_Consumer::offer_change (const CosNotification::EventTypeSeq & /*added*/,
const CosNotification::EventTypeSeq & /*removed*/
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
@@ -92,7 +92,7 @@ TAO_NS_Consumer::offer_change (const CosNotification::EventTypeSeq & /*added*/,
}
void
-TAO_NS_Consumer::push_structured_event (const CosNotification::StructuredEvent & notification
+TAO_Notify_Lanes_Consumer::push_structured_event (const CosNotification::StructuredEvent & notification
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
CORBA::SystemException,
@@ -144,7 +144,7 @@ TAO_NS_Consumer::push_structured_event (const CosNotification::StructuredEvent &
}
void
-TAO_NS_Consumer::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer::deactivate (ACE_ENV_SINGLE_ARG_DECL)
{
PortableServer::POA_var poa (this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER));
ACE_CHECK;
@@ -159,7 +159,7 @@ TAO_NS_Consumer::deactivate (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Consumer::disconnect_structured_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer::disconnect_structured_push_consumer (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
))
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Consumer.h b/TAO/orbsvcs/examples/Notify/Lanes/Consumer.h
index fa424394dd7..861b68d6cd1 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Consumer.h
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Consumer.h
@@ -9,8 +9,8 @@
*
*/
-#ifndef TAO_NS_CONSUMER_H
-#define TAO_NS_CONSUMER_H
+#ifndef TAO_Notify_CONSUMER_H
+#define TAO_Notify_CONSUMER_H
#include "ace/pre.h"
@@ -20,17 +20,17 @@
#include "orbsvcs/orbsvcs/CosNotifyCommC.h"
/**
- * @class TAO_NS_Consumer
+ * @class TAO_Notify_Lanes_Consumer
*
* @brief Consumer
*
*/
-class TAO_NS_Consumer : public POA_CosNotifyComm::StructuredPushConsumer, public PortableServer::RefCountServantBase
+class TAO_Notify_Lanes_Consumer : public POA_CosNotifyComm::StructuredPushConsumer, public PortableServer::RefCountServantBase
{
public:
/// Constuctor
- TAO_NS_Consumer (TAO_NS_ORB_Objects& orb_objects);
+ TAO_Notify_Lanes_Consumer (TAO_Notify_ORB_Objects& orb_objects);
/// Init
void init (PortableServer::POA_var& poa, CosNotifyChannelAdmin::ConsumerAdmin_var& admin, ACE_CString& event_type ACE_ENV_ARG_DECL);
@@ -42,7 +42,7 @@ protected:
// = Data members
/// ORB Objects.
- TAO_NS_ORB_Objects orb_objects_;
+ TAO_Notify_ORB_Objects orb_objects_;
/// The proxy that we are connected to.
CosNotifyChannelAdmin::StructuredProxyPushSupplier_var proxy_supplier_;
@@ -61,7 +61,7 @@ protected:
// = Methods
/// Destructor
- virtual ~TAO_NS_Consumer (void);
+ virtual ~TAO_Notify_Lanes_Consumer (void);
// = ServantBase operations
virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
@@ -106,4 +106,4 @@ protected:
};
#include "ace/post.h"
-#endif /* TAO_NS_CONSUMER_H */
+#endif /* TAO_Notify_CONSUMER_H */
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.cpp b/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.cpp
index a1b7f716bf7..0abd8237b17 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.cpp
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.cpp
@@ -9,21 +9,21 @@
#include "tao/ORB_Core.h"
#include "ace/Sched_Params.h"
-ACE_RCSID(Notify, TAO_NS_Consumer_Client, "$id$")
+ACE_RCSID(Notify, TAO_Notify_Lanes_Consumer_Client, "$id$")
-TAO_NS_Consumer_Client::TAO_NS_Consumer_Client (TAO_NS_ORB_Objects& orb_objects)
+TAO_Notify_Lanes_Consumer_Client::TAO_Notify_Lanes_Consumer_Client (TAO_Notify_ORB_Objects& orb_objects)
: orb_objects_ (orb_objects)
, lane_priority_ (0)
, consumer_ (0)
{
}
-TAO_NS_Consumer_Client::~TAO_NS_Consumer_Client ()
+TAO_Notify_Lanes_Consumer_Client::~TAO_Notify_Lanes_Consumer_Client ()
{
}
int
-TAO_NS_Consumer_Client::parse_args (int argc, char *argv[])
+TAO_Notify_Lanes_Consumer_Client::parse_args (int argc, char *argv[])
{
ACE_Arg_Shifter arg_shifter (argc, argv);
@@ -54,7 +54,7 @@ TAO_NS_Consumer_Client::parse_args (int argc, char *argv[])
}
void
-TAO_NS_Consumer_Client::initialize (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer_Client::initialize (ACE_ENV_SINGLE_ARG_DECL)
{
ACE_DEBUG ((LM_DEBUG, "(%P, %t)Initializing Consumer Client with lane priority = %d, event type = (%s)\n"
, this->lane_priority_, this->event_type_.c_str ()));
@@ -100,14 +100,14 @@ TAO_NS_Consumer_Client::initialize (ACE_ENV_SINGLE_ARG_DECL)
ACE_CHECK;
// Create a Consumer
- this->consumer_ = new TAO_NS_Consumer (this->orb_objects_);
+ this->consumer_ = new TAO_Notify_Lanes_Consumer (this->orb_objects_);
// Initialize it.
this->consumer_->init (rt_poa, consumer_admin, this->event_type_ ACE_ENV_ARG_PARAMETER);
}
PortableServer::POA_ptr
-TAO_NS_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
{
PortableServer::POA_var rt_poa;
@@ -179,13 +179,13 @@ TAO_NS_Consumer_Client::create_rt_poa (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Consumer_Client::run (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Consumer_Client::run (ACE_ENV_SINGLE_ARG_DECL)
{
this->consumer_->run (ACE_ENV_SINGLE_ARG_PARAMETER);
}
int
-TAO_NS_Consumer_Client::svc (void)
+TAO_Notify_Lanes_Consumer_Client::svc (void)
{
ACE_TRY_NEW_ENV
{
@@ -222,14 +222,14 @@ main (int argc, char *argv [])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_NS_ORB_Objects orb_objects;
+ TAO_Notify_ORB_Objects orb_objects;
orb_objects.init (orb ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_NS_ORB_Run_Task orb_run_task (orb_objects);
+ TAO_Notify_ORB_Run_Task orb_run_task (orb_objects);
- TAO_NS_Consumer_Client client (orb_objects);
+ TAO_Notify_Lanes_Consumer_Client client (orb_objects);
if (client.parse_args (argc, argv) != 0)
{
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.h b/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.h
index ef483c0c8e4..782bf426f5c 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.h
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Consumer_Client.h
@@ -9,8 +9,8 @@
*
*/
-#ifndef TAO_NS_CONSUMER_CLIENT_H
-#define TAO_NS_CONSUMER_CLIENT_H
+#ifndef TAO_Notify_CONSUMER_CLIENT_H
+#define TAO_Notify_CONSUMER_CLIENT_H
#include "ace/pre.h"
#include "ORB_Objects.h"
@@ -18,22 +18,22 @@
#include "tao/corba.h"
#include "tao/RTCORBA/RTCORBA.h"
-class TAO_NS_Consumer;
+class TAO_Notify_Lanes_Consumer;
/**
- * @class TAO_NS_Consumer_Client
+ * @class TAO_Notify_Lanes_Consumer_Client
*
* @brief
*
*/
-class TAO_NS_Consumer_Client : public ACE_Task_Base
+class TAO_Notify_Lanes_Consumer_Client : public ACE_Task_Base
{
public:
/// Constuctor
- TAO_NS_Consumer_Client (TAO_NS_ORB_Objects& orb_objects);
+ TAO_Notify_Lanes_Consumer_Client (TAO_Notify_ORB_Objects& orb_objects);
/// Destructor
- ~TAO_NS_Consumer_Client ();
+ ~TAO_Notify_Lanes_Consumer_Client ();
/// Init
void initialize (ACE_ENV_SINGLE_ARG_DECL);
@@ -52,7 +52,7 @@ protected:
PortableServer::POA_ptr create_rt_poa (ACE_ENV_SINGLE_ARG_DECL);
/// ORB Objects.
- TAO_NS_ORB_Objects orb_objects_;
+ TAO_Notify_ORB_Objects orb_objects_;
/// Lock to serialize internal state.
TAO_SYNCH_MUTEX lock_;
@@ -64,11 +64,11 @@ protected:
RTCORBA::Priority lane_priority_;
/// The Consumer.
- TAO_NS_Consumer* consumer_;
+ TAO_Notify_Lanes_Consumer* consumer_;
/// The Type the Consumer should subscribe to.
ACE_CString event_type_;
};
#include "ace/post.h"
-#endif /* TAO_NS_CONSUMER_CLIENT_H */
+#endif /* TAO_Notify_CONSUMER_CLIENT_H */
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.cpp b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.cpp
index 860d6097f94..6b7580a0255 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.cpp
+++ b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.cpp
@@ -2,14 +2,14 @@
#include "ORB_Objects.h"
-ACE_RCSID(Notify, TAO_NS_ORB_Objects, "$id$")
+ACE_RCSID(Notify, TAO_Notify_ORB_Objects, "$id$")
-TAO_NS_ORB_Objects::TAO_NS_ORB_Objects (void)
+TAO_Notify_ORB_Objects::TAO_Notify_ORB_Objects (void)
{
}
void
-TAO_NS_ORB_Objects::init (CORBA::ORB_var& orb ACE_ENV_ARG_DECL)
+TAO_Notify_ORB_Objects::init (CORBA::ORB_var& orb ACE_ENV_ARG_DECL)
{
this->orb_ = orb;
@@ -47,12 +47,12 @@ TAO_NS_ORB_Objects::init (CORBA::ORB_var& orb ACE_ENV_ARG_DECL)
ACE_CHECK;
}
-TAO_NS_ORB_Objects::~TAO_NS_ORB_Objects ()
+TAO_Notify_ORB_Objects::~TAO_Notify_ORB_Objects ()
{
}
CosNotifyChannelAdmin::EventChannelFactory_ptr
-TAO_NS_ORB_Objects::notify_factory (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_ORB_Objects::notify_factory (ACE_ENV_SINGLE_ARG_DECL)
{
CosNotifyChannelAdmin::EventChannelFactory_var ecf;
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.h b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.h
index 8053a7eb1d2..2d9de45a194 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.h
+++ b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Objects.h
@@ -9,8 +9,8 @@
*
*/
-#ifndef TAO_NS_ORB_OBJECTS_H
-#define TAO_NS_ORB_OBJECTS_H
+#ifndef TAO_Notify_ORB_OBJECTS_H
+#define TAO_Notify_ORB_OBJECTS_H
#include "ace/pre.h"
#include "tao/corba.h"
@@ -20,19 +20,19 @@
#include "orbsvcs/orbsvcs/CosNamingC.h"
/**
- * @class TAO_NS_ORB_Objects
+ * @class TAO_Notify_ORB_Objects
*
* @brief Handy Objects that we keep asking the ORB for.
*
*/
-class TAO_NS_ORB_Objects
+class TAO_Notify_ORB_Objects
{
public:
/// Constuctor
- TAO_NS_ORB_Objects (void);
+ TAO_Notify_ORB_Objects (void);
/// Destructor
- ~TAO_NS_ORB_Objects ();
+ ~TAO_Notify_ORB_Objects ();
/// Resolves all the references.
void init (CORBA::ORB_var& orb ACE_ENV_ARG_DECL);
@@ -53,4 +53,4 @@ public:
};
#include "ace/post.h"
-#endif /* TAO_NS_ORB_OBJECTS_H */
+#endif /* TAO_Notify_ORB_OBJECTS_H */
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.cpp b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.cpp
index 1ee15b30fcb..ea8601551c0 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.cpp
+++ b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.cpp
@@ -2,19 +2,19 @@
#include "ORB_Run_Task.h"
-ACE_RCSID(Notify, TAO_NS_ORB_Run_Task, "$id$")
+ACE_RCSID(Notify, TAO_Notify_ORB_Run_Task, "$id$")
-TAO_NS_ORB_Run_Task::TAO_NS_ORB_Run_Task (TAO_NS_ORB_Objects& orb_objects)
+TAO_Notify_ORB_Run_Task::TAO_Notify_ORB_Run_Task (TAO_Notify_ORB_Objects& orb_objects)
: orb_objects_ (orb_objects)
{
}
-TAO_NS_ORB_Run_Task::~TAO_NS_ORB_Run_Task ()
+TAO_Notify_ORB_Run_Task::~TAO_Notify_ORB_Run_Task ()
{
}
int
-TAO_NS_ORB_Run_Task::svc (void)
+TAO_Notify_ORB_Run_Task::svc (void)
{
ACE_TRY_NEW_ENV
{
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.h b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.h
index 7fb53b4f1f2..9be9f90501b 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.h
+++ b/TAO/orbsvcs/examples/Notify/Lanes/ORB_Run_Task.h
@@ -9,8 +9,8 @@
*
*/
-#ifndef TAO_NS_ORB_RUN_TASK_H
-#define TAO_NS_ORB_RUN_TASK_H
+#ifndef TAO_Notify_ORB_RUN_TASK_H
+#define TAO_Notify_ORB_RUN_TASK_H
#include "ace/pre.h"
#include "ORB_Objects.h"
@@ -18,27 +18,27 @@
#include "tao/corba.h"
/**
- * @class TAO_NS_ORB_Run_Task
+ * @class TAO_Notify_ORB_Run_Task
*
* @brief Run the ORB::run method in a seperate thread.
*
*/
-class TAO_NS_ORB_Run_Task : public ACE_Task_Base
+class TAO_Notify_ORB_Run_Task : public ACE_Task_Base
{
public:
/// Constuctor
- TAO_NS_ORB_Run_Task (TAO_NS_ORB_Objects& orb_objects);
+ TAO_Notify_ORB_Run_Task (TAO_Notify_ORB_Objects& orb_objects);
/// Destructor
- ~TAO_NS_ORB_Run_Task ();
+ ~TAO_Notify_ORB_Run_Task ();
/// The thread entry point.
virtual int svc (void);
private:
/// ORB Objects.
- TAO_NS_ORB_Objects orb_objects_;
+ TAO_Notify_ORB_Objects orb_objects_;
};
#include "ace/post.h"
-#endif /* TAO_NS_ORB_RUN_TASK_H */
+#endif /* TAO_Notify_ORB_RUN_TASK_H */
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Supplier.cpp b/TAO/orbsvcs/examples/Notify/Lanes/Supplier.cpp
index af5c8cd69c5..5ff04768ef9 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Supplier.cpp
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Supplier.cpp
@@ -2,11 +2,11 @@
#include "Supplier.h"
-ACE_RCSID(Notify, TAO_NS_Supplier, "$id$")
+ACE_RCSID(Notify, TAO_Notify_Lanes_Supplier, "$id$")
#include "tao/ORB_Core.h"
-TAO_NS_Supplier::TAO_NS_Supplier (TAO_NS_ORB_Objects& orb_objects)
+TAO_Notify_Lanes_Supplier::TAO_Notify_Lanes_Supplier (TAO_Notify_ORB_Objects& orb_objects)
: orb_objects_ (orb_objects)
, proxy_consumer_id_ (0)
, expected_consumer_count_ (2)
@@ -15,12 +15,12 @@ TAO_NS_Supplier::TAO_NS_Supplier (TAO_NS_ORB_Objects& orb_objects)
{
}
-TAO_NS_Supplier::~TAO_NS_Supplier ()
+TAO_Notify_Lanes_Supplier::~TAO_Notify_Lanes_Supplier ()
{
}
void
-TAO_NS_Supplier::init (CosNotifyChannelAdmin::SupplierAdmin_var& admin, int expected_consumer_count ACE_ENV_ARG_DECL)
+TAO_Notify_Lanes_Supplier::init (CosNotifyChannelAdmin::SupplierAdmin_var& admin, int expected_consumer_count ACE_ENV_ARG_DECL)
{
// First initialize the class members.
this->admin_ = admin;
@@ -30,7 +30,7 @@ TAO_NS_Supplier::init (CosNotifyChannelAdmin::SupplierAdmin_var& admin, int expe
}
void
-TAO_NS_Supplier::run (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier::run (ACE_ENV_SINGLE_ARG_DECL)
{
// The Priority at which we send the first event to the first consumer.
RTCORBA::Priority priority = 1;
@@ -97,7 +97,7 @@ TAO_NS_Supplier::run (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Supplier::connect (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier::connect (ACE_ENV_SINGLE_ARG_DECL)
{
// Activate the supplier object.
CosNotifyComm::StructuredPushSupplier_var objref = this->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -125,7 +125,7 @@ TAO_NS_Supplier::connect (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL)
{
ACE_ASSERT (!CORBA::is_nil (this->proxy_consumer_.in ()));
@@ -133,7 +133,7 @@ TAO_NS_Supplier::disconnect (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Supplier::deactivate (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier::deactivate (ACE_ENV_SINGLE_ARG_DECL)
{
PortableServer::POA_var poa (this->_default_POA (ACE_ENV_SINGLE_ARG_PARAMETER));
ACE_CHECK;
@@ -148,7 +148,7 @@ TAO_NS_Supplier::deactivate (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Supplier::subscription_change (const CosNotification::EventTypeSeq & added,
+TAO_Notify_Lanes_Supplier::subscription_change (const CosNotification::EventTypeSeq & added,
const CosNotification::EventTypeSeq & /*removed */
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((
@@ -167,7 +167,7 @@ TAO_NS_Supplier::subscription_change (const CosNotification::EventTypeSeq & adde
}
void
-TAO_NS_Supplier::send_event (const CosNotification::StructuredEvent& event ACE_ENV_ARG_DECL)
+TAO_Notify_Lanes_Supplier::send_event (const CosNotification::StructuredEvent& event ACE_ENV_ARG_DECL)
{
ACE_ASSERT (!CORBA::is_nil (this->proxy_consumer_.in ()));
@@ -176,7 +176,7 @@ TAO_NS_Supplier::send_event (const CosNotification::StructuredEvent& event ACE_E
}
void
-TAO_NS_Supplier::disconnect_structured_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier::disconnect_structured_push_supplier (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((
CORBA::SystemException
))
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h b/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h
index ebac2f9508c..ef44ffd1223 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Supplier.h
@@ -9,8 +9,8 @@
*
*/
-#ifndef TAO_NS_SUPPLIER_H
-#define TAO_NS_SUPPLIER_H
+#ifndef TAO_Notify_SUPPLIER_H
+#define TAO_Notify_SUPPLIER_H
#include "ace/pre.h"
#include "ORB_Objects.h"
@@ -26,18 +26,18 @@
#endif /* _MSC_VER */
/**
- * @class TAO_NS_Supplier
+ * @class TAO_Notify_Lanes_Supplier
*
* @brief Implement a Structured Supplier.
*
*/
-class TAO_NS_Supplier : public POA_CosNotifyComm::StructuredPushSupplier, public PortableServer::RefCountServantBase
+class TAO_Notify_Lanes_Supplier : public POA_CosNotifyComm::StructuredPushSupplier, public PortableServer::RefCountServantBase
{
public:
// = Initialization and Termination code
/// Constructor.
- TAO_NS_Supplier (TAO_NS_ORB_Objects& orb_objects);
+ TAO_Notify_Lanes_Supplier (TAO_Notify_ORB_Objects& orb_objects);
/// Init
void init (CosNotifyChannelAdmin::SupplierAdmin_var& admin, int count ACE_ENV_ARG_DECL);
@@ -62,7 +62,7 @@ protected:
virtual void send_event (const CosNotification::StructuredEvent& event ACE_ENV_ARG_DECL);
/// Destructor
- virtual ~TAO_NS_Supplier ();
+ virtual ~TAO_Notify_Lanes_Supplier ();
// = NotifySubscribe
virtual void subscription_change (
@@ -83,7 +83,7 @@ protected:
/// = Data members
/// ORB Objects.
- TAO_NS_ORB_Objects orb_objects_;
+ TAO_Notify_ORB_Objects orb_objects_;
/// The proxy that we are connected to.
CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxy_consumer_;
@@ -115,4 +115,4 @@ protected:
#endif /* _MSC_VER */
#include "ace/post.h"
-#endif /* TAO_NS_SUPPLIER_H */
+#endif /* TAO_Notify_SUPPLIER_H */
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp b/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp
index a45542a3944..82f4914082c 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.cpp
@@ -10,21 +10,21 @@
#include "orbsvcs/orbsvcs/NotifyExtC.h"
#include "orbsvcs/orbsvcs/CosNamingC.h"
-ACE_RCSID(Notify, TAO_NS_Supplier_Client, "$id$")
+ACE_RCSID(Notify, TAO_Notify_Lanes_Supplier_Client, "$id$")
-TAO_NS_Supplier_Client::TAO_NS_Supplier_Client (TAO_NS_ORB_Objects& orb_objects)
+TAO_Notify_Lanes_Supplier_Client::TAO_Notify_Lanes_Supplier_Client (TAO_Notify_ORB_Objects& orb_objects)
: orb_objects_ (orb_objects)
,supplier_ (0)
, consumer_count_ (2)
{
}
-TAO_NS_Supplier_Client::~TAO_NS_Supplier_Client ()
+TAO_Notify_Lanes_Supplier_Client::~TAO_Notify_Lanes_Supplier_Client ()
{
}
int
-TAO_NS_Supplier_Client::parse_args (int argc, char *argv[])
+TAO_Notify_Lanes_Supplier_Client::parse_args (int argc, char *argv[])
{
ACE_Arg_Shifter arg_shifter (argc, argv);
@@ -60,7 +60,7 @@ TAO_NS_Supplier_Client::parse_args (int argc, char *argv[])
}
void
-TAO_NS_Supplier_Client::initialize (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier_Client::initialize (ACE_ENV_SINGLE_ARG_DECL)
{
PortableServer::POAManager_var poa_manager =
this->orb_objects_.root_poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -82,14 +82,14 @@ TAO_NS_Supplier_Client::initialize (ACE_ENV_SINGLE_ARG_DECL)
ACE_ASSERT (!CORBA::is_nil (supplier_admin.in ()));
// Create a Supplier
- this->supplier_ = new TAO_NS_Supplier (this->orb_objects_);
+ this->supplier_ = new TAO_Notify_Lanes_Supplier (this->orb_objects_);
// Initialize it.
this->supplier_->init (supplier_admin, this->consumer_count_ ACE_ENV_ARG_PARAMETER);
}
CosNotifyChannelAdmin::EventChannel_ptr
-TAO_NS_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL)
{
CosNotifyChannelAdmin::EventChannel_var ec;
@@ -154,7 +154,7 @@ TAO_NS_Supplier_Client::create_ec (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Supplier_Client::run (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier_Client::run (ACE_ENV_SINGLE_ARG_DECL)
{
/// First, signal that the supplier is ready.
this->write_ior (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -164,7 +164,7 @@ TAO_NS_Supplier_Client::run (ACE_ENV_SINGLE_ARG_DECL)
}
void
-TAO_NS_Supplier_Client::write_ior (ACE_ENV_SINGLE_ARG_DECL)
+TAO_Notify_Lanes_Supplier_Client::write_ior (ACE_ENV_SINGLE_ARG_DECL)
{
CosNotifyComm::StructuredPushSupplier_var objref = this->supplier_->_this (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
@@ -186,7 +186,7 @@ TAO_NS_Supplier_Client::write_ior (ACE_ENV_SINGLE_ARG_DECL)
}
int
-TAO_NS_Supplier_Client::svc (void)
+TAO_Notify_Lanes_Supplier_Client::svc (void)
{
ACE_TRY_NEW_ENV
{
@@ -223,16 +223,16 @@ main (int argc, char *argv [])
ACE_TRY_CHECK;
// Create a holder for the common ORB Objects.
- TAO_NS_ORB_Objects orb_objects;
+ TAO_Notify_ORB_Objects orb_objects;
orb_objects.init (orb ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
/* Run the ORB in a seperate thread */
- TAO_NS_ORB_Run_Task orb_run_task (orb_objects);
+ TAO_Notify_ORB_Run_Task orb_run_task (orb_objects);
/* Create a Client */
- TAO_NS_Supplier_Client client (orb_objects);
+ TAO_Notify_Lanes_Supplier_Client client (orb_objects);
if (client.parse_args (argc, argv) != 0)
{
diff --git a/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.h b/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.h
index f8b0c8a247e..cf99f8ee62e 100644
--- a/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.h
+++ b/TAO/orbsvcs/examples/Notify/Lanes/Supplier_Client.h
@@ -9,30 +9,30 @@
*
*/
-#ifndef TAO_NS_SUPPLIER_CLIENT_H
-#define TAO_NS_SUPPLIER_CLIENT_H
+#ifndef TAO_Notify_SUPPLIER_CLIENT_H
+#define TAO_Notify_SUPPLIER_CLIENT_H
#include "ace/pre.h"
#include "ORB_Objects.h"
#include "ace/Task.h"
#include "tao/corba.h"
-class TAO_NS_Supplier;
+class TAO_Notify_Lanes_Supplier;
/**
- * @class TAO_NS_Supplier_Client
+ * @class TAO_Notify_Lanes_Supplier_Client
*
* @brief Supplier Client
*
*/
-class TAO_NS_Supplier_Client : public ACE_Task_Base
+class TAO_Notify_Lanes_Supplier_Client : public ACE_Task_Base
{
public:
/// Constuctor
- TAO_NS_Supplier_Client (TAO_NS_ORB_Objects& orb_objects);
+ TAO_Notify_Lanes_Supplier_Client (TAO_Notify_ORB_Objects& orb_objects);
/// Destructor
- ~TAO_NS_Supplier_Client ();
+ ~TAO_Notify_Lanes_Supplier_Client ();
/// Init
void initialize (ACE_ENV_SINGLE_ARG_DECL);
@@ -54,10 +54,10 @@ protected:
void write_ior (ACE_ENV_SINGLE_ARG_DECL);
/// ORB Objects.
- TAO_NS_ORB_Objects orb_objects_;
+ TAO_Notify_ORB_Objects orb_objects_;
/// Supplier that sends events.
- TAO_NS_Supplier* supplier_;
+ TAO_Notify_Lanes_Supplier* supplier_;
/// The Number of consumers that we expect to send an event to.
int consumer_count_;
@@ -67,4 +67,4 @@ protected:
};
#include "ace/post.h"
-#endif /* TAO_NS_SUPPLIER_CLIENT_H */
+#endif /* TAO_Notify_SUPPLIER_CLIENT_H */
diff --git a/TAO/orbsvcs/examples/Notify/Subscribe/run_test.pl b/TAO/orbsvcs/examples/Notify/Subscribe/run_test.pl
new file mode 100755
index 00000000000..7b14c5cee62
--- /dev/null
+++ b/TAO/orbsvcs/examples/Notify/Subscribe/run_test.pl
@@ -0,0 +1,73 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+use lib "../../../../../bin";
+use PerlACE::Run_Test;
+
+$experiment_timeout = 60;
+$startup_timeout = 60;
+
+$notify_ior = PerlACE::LocalFile ("notify.ior");
+
+$naming_ior = PerlACE::LocalFile ("naming.ior");
+
+$status = 0;
+
+$Naming = new PerlACE::Process ("../../../Naming_Service/Naming_Service",
+ "-o $naming_ior");
+
+$Notification = new PerlACE::Process ("../../../Notify_Service/Notify_Service");
+
+$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior ";
+
+$Subscribe = new PerlACE::Process ("Subscribe");
+
+$Subscribe_Args = "-ORBInitRef NameService=file://$naming_ior";
+
+unlink $naming_ior;
+$Naming->Spawn ();
+
+if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the naming service to start\n";
+ $Naming->Kill ();
+ exit 1;
+}
+
+unlink $notify_ior;
+$Notification->Arguments ($Notify_Args);
+$args = $Notification->Arguments ();
+print STDERR "Running Notification with arguments: $args\n";
+$Notification->Spawn ();
+
+if (PerlACE::waitforfile_timed ($notify_ior, $startup_timeout) == -1) {
+ print STDERR "ERROR: waiting for the notify service to start\n";
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+}
+
+$Subscribe->Arguments ($Subscribe_Args);
+$args = $Subscribe->Arguments ();
+print STDERR "Running Subscribe with arguments: $args\n";
+$status = $Subscribe->SpawnWaitKill ($experiment_timeout);
+
+if ($status != 0)
+ {
+ print STDERR "ERROR: Subscribe returned $status\n";
+ $Subscribe->Kill ();
+ $Notification->Kill ();
+ $Naming->Kill ();
+ exit 1;
+ }
+
+$Notification->Kill ();
+unlink $notify_ior;
+
+$Naming->Kill ();
+unlink $naming_ior;
+
+exit $status;