diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-25 03:17:34 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-25 03:17:34 +0000 |
commit | 2281a97986dc8e05a32bfdde88918794be8b9869 (patch) | |
tree | b63db59ea22e8470e52655d82269719349354591 | |
parent | 0c7a15f01fb4fc21608107cc70444f9930b560c5 (diff) | |
download | ATCD-2281a97986dc8e05a32bfdde88918794be8b9869.tar.gz |
Wed May 24 22:14:03 2000 Pradeep Gore <pradeep@flamenco.cs.wustl.edu>
-rw-r--r-- | TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.cpp | 2 | ||||
-rw-r--r-- | TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h | 12 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/Makefile | 410 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/README | 4 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/Updates.cpp | 32 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Basic/Updates.h | 37 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Makefile | 28 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp | 169 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h | 95 |
9 files changed, 783 insertions, 6 deletions
diff --git a/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.cpp b/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.cpp index fb9f4145201..b6c895f7bb1 100644 --- a/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.cpp +++ b/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.cpp @@ -1,6 +1,8 @@ /* -*- C++ -*- $Id$ */ #include "Subscribe.h" +ACE_RCSID(Notify, Subscribe, "$Id$") + #define NOTIFY_FACTORY_NAME "NotifyEventChannelFactory" #define NAMING_SERVICE_NAME "NameService" diff --git a/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h b/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h index 8b95308ab28..aad6f322246 100644 --- a/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h +++ b/TAO/orbsvcs/examples/Notify/Subscribe/Subscribe.h @@ -3,18 +3,18 @@ // ========================================================================== // // = FILENAME -// Filter.h +// Subscribe.h // // = DESCRIPTION -// Class to demo structured event filtering. +// Class to demo structured event subscription. // // = AUTHOR // Pradeep Gore <pradeep@cs.wustl.edu> // // ========================================================================== -#ifndef NOTIFY_FILTER_CLIENT_H -#define NOTIFY_FILTER_CLIENT_H +#ifndef NOTIFY_SUBSCRIBE_CLIENT_H +#define NOTIFY_SUBSCRIBE_CLIENT_H #include "orbsvcs/CosNotifyChannelAdminS.h" #include "orbsvcs/CosNotifyCommC.h" @@ -181,7 +181,7 @@ class Subscribe_StructuredPushSupplier : public POA_CosNotifyComm::StructuredPus // Subscribe_StructuredPushSupplier // // = DESCRIPTION - // Supplier for the filter example. + // Supplier for the SUBSCRIBE example. // public: // = Initialization and Termination code @@ -233,4 +233,4 @@ protected: }; /*****************************************************************/ -#endif /* NOTIFY_FILTER_CLIENT_H */ +#endif /* NOTIFY_SUBSCRIBE_CLIENT_H */ diff --git a/TAO/orbsvcs/tests/Notify/Basic/Makefile b/TAO/orbsvcs/tests/Notify/Basic/Makefile new file mode 100644 index 00000000000..7e02ba0bc94 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Basic/Makefile @@ -0,0 +1,410 @@ +#---------------------------------------------------------------------------- +# +# $Id$ +# +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +ifndef TAO_ROOT + TAO_ROOT = $(ACE_ROOT)/TAO +endif + +LDLIBS = -lNotifyTests -lTAO_CosNotification -lTAO_CosNaming -lTAO + +LSRC = Updates.cpp + +NOTIFY_BASIC_OBJS = $(LSRC:.cpp=.o) + +BIN2 = Updates + +#### If the TAO orbsvcs library wasn't built with sufficient components, +#### don't try to build here. +TAO_ORBSVCS := $(shell sh $(ACE_ROOT)/bin/ace_components --orbsvcs) +ifeq (Notify,$(findstring Notify,$(TAO_ORBSVCS))) + ifeq (Naming,$(findstring Naming,$(TAO_ORBSVCS))) + BIN = $(BIN2) + endif # Naming +endif # Notify + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.local.GNU +include $(TAO_ROOT)/taoconfig.mk + +#---------------------------------------------------------------------------- +# Local targets +#---------------------------------------------------------------------------- + + +LDFLAGS += -L$(TAO_ROOT)/orbsvcs/orbsvcs -L$(TAO_ROOT)/tao +CPPFLAGS += -I$(TAO_ROOT)/orbsvcs +CPPFLAGS += -I../lib -I$(TAO_ROOT) -I$(TAO_ROOT)/orbsvcs \ + $(foreach svc, $(TAO_ORBSVCS), -DTAO_ORBSVCS_HAS_$(svc)) + +override TAO_IDLFLAGS += -I$(TAO_ROOT)/orbsvcs -Ge 1 + +Updates : $(addprefix $(VDIR),$(NOTIFY_BASIC_OBJS)) + $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) + +realclean: clean + +#---------------------------------------------------------------------------- +# Dependencies +#---------------------------------------------------------------------------- + +# DO NOT DELETE THIS LINE -- g++dep uses it. +# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + + +.obj/Updates.o .obj/Updates.so .shobj/Updates.o .shobj/Updates.so: Updates.cpp Updates.h ../lib/Notify_Test_Client.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminS.h \ + $(ACE_ROOT)/ace/pre.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationC.h \ + $(TAO_ROOT)/tao/corba.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/config-sunos5.6.h \ + $(ACE_ROOT)/ace/config-sunos5.5.h \ + $(ACE_ROOT)/ace/post.h \ + $(ACE_ROOT)/ace/ace_wchar.h \ + $(ACE_ROOT)/ace/ACE_export.h \ + $(ACE_ROOT)/ace/svc_export.h \ + $(ACE_ROOT)/ace/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Dirent.inl \ + $(ACE_ROOT)/ace/Min_Max.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(TAO_ROOT)/tao/corbafwd.h \ + $(ACE_ROOT)/ace/CDR_Stream.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/CDR_Stream.i \ + $(TAO_ROOT)/tao/try_macros.h \ + $(TAO_ROOT)/tao/orbconf.h \ + $(ACE_ROOT)/ace/CORBA_macros.h \ + $(TAO_ROOT)/tao/varbase.h \ + $(TAO_ROOT)/tao/corbafwd.i \ + $(TAO_ROOT)/tao/Environment.h \ + $(TAO_ROOT)/tao/Environment.i \ + $(TAO_ROOT)/tao/ORB.h \ + $(TAO_ROOT)/tao/Exception.h \ + $(TAO_ROOT)/tao/Exception.i \ + $(TAO_ROOT)/tao/IOR_LookupTable.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/Functor.i \ + $(ACE_ROOT)/ace/Functor_T.h \ + $(ACE_ROOT)/ace/Functor_T.i \ + $(ACE_ROOT)/ace/Functor_T.cpp \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(TAO_ROOT)/tao/Services.h \ + $(TAO_ROOT)/tao/Sequence.h \ + $(TAO_ROOT)/tao/Managed_Types.h \ + $(TAO_ROOT)/tao/Managed_Types.i \ + $(TAO_ROOT)/tao/Sequence.i \ + $(TAO_ROOT)/tao/Sequence_T.h \ + $(TAO_ROOT)/tao/Sequence_T.i \ + $(TAO_ROOT)/tao/Sequence_T.cpp \ + $(TAO_ROOT)/tao/Services.i \ + $(TAO_ROOT)/tao/IORManipulation.h \ + $(TAO_ROOT)/tao/Object.h \ + $(TAO_ROOT)/tao/Object.i \ + $(TAO_ROOT)/tao/IORS.h \ + $(TAO_ROOT)/tao/IORC.h \ + $(TAO_ROOT)/tao/CDR.h \ + $(TAO_ROOT)/tao/CDR.i \ + $(TAO_ROOT)/tao/IORC.i \ + $(TAO_ROOT)/tao/Servant_Base.h \ + $(TAO_ROOT)/tao/POAC.h \ + $(TAO_ROOT)/tao/PolicyC.h \ + $(TAO_ROOT)/tao/CurrentC.h \ + $(TAO_ROOT)/tao/CurrentC.i \ + $(TAO_ROOT)/tao/PolicyC.i \ + $(TAO_ROOT)/tao/POAC.i \ + $(TAO_ROOT)/tao/Servant_Base.i \ + $(TAO_ROOT)/tao/IORS.i \ + $(TAO_ROOT)/tao/Interceptor.h \ + $(TAO_ROOT)/tao/InterceptorC.h \ + $(TAO_ROOT)/tao/IOPC.h \ + $(TAO_ROOT)/tao/IOPC.i \ + $(TAO_ROOT)/tao/InterceptorC.i \ + $(TAO_ROOT)/tao/Interceptor.i \ + $(TAO_ROOT)/tao/ORB.i \ + $(TAO_ROOT)/tao/Any.h \ + $(TAO_ROOT)/tao/Any.i \ + $(TAO_ROOT)/tao/NVList.h \ + $(TAO_ROOT)/tao/NVList.i \ + $(TAO_ROOT)/tao/Principal.h \ + $(TAO_ROOT)/tao/Principal.i \ + $(TAO_ROOT)/tao/Request.h \ + $(TAO_ROOT)/tao/Context.h \ + $(TAO_ROOT)/tao/Context.i \ + $(TAO_ROOT)/tao/MessagingC.h \ + $(TAO_ROOT)/tao/TimeBaseC.h \ + $(TAO_ROOT)/tao/TimeBaseC.i \ + $(TAO_ROOT)/tao/PollableC.h \ + $(TAO_ROOT)/tao/MessagingC.i \ + $(TAO_ROOT)/tao/Request.i \ + $(TAO_ROOT)/tao/Server_Request.h \ + $(TAO_ROOT)/tao/Object_KeyC.h \ + $(TAO_ROOT)/tao/Object_KeyC.i \ + $(TAO_ROOT)/tao/Server_Request.i \ + $(TAO_ROOT)/tao/LocalObject.h \ + $(TAO_ROOT)/tao/LocalObject.i \ + $(TAO_ROOT)/tao/Typecode.h \ + $(TAO_ROOT)/tao/Typecode.i \ + $(TAO_ROOT)/tao/POA.h \ + $(TAO_ROOT)/tao/Object_Adapter.h \ + $(TAO_ROOT)/tao/Key_Adapters.h \ + $(ACE_ROOT)/ace/Map.h \ + $(ACE_ROOT)/ace/Map_T.h \ + $(ACE_ROOT)/ace/Pair.h \ + $(ACE_ROOT)/ace/Pair_T.h \ + $(ACE_ROOT)/ace/Pair_T.i \ + $(ACE_ROOT)/ace/Pair_T.cpp \ + $(ACE_ROOT)/ace/Map_Manager.h \ + $(ACE_ROOT)/ace/Map_Manager.i \ + $(ACE_ROOT)/ace/Map_Manager.cpp \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp \ + $(ACE_ROOT)/ace/Map_T.i \ + $(ACE_ROOT)/ace/Map_T.cpp \ + $(TAO_ROOT)/tao/Key_Adapters.i \ + $(TAO_ROOT)/tao/Server_Strategy_Factory.h \ + $(TAO_ROOT)/tao/poa_macros.h \ + $(TAO_ROOT)/tao/POAS.h \ + $(TAO_ROOT)/tao/POA_CORBA.h \ + $(TAO_ROOT)/tao/DynAnyC.h \ + $(TAO_ROOT)/tao/DynAnyC.i \ + $(TAO_ROOT)/tao/DomainC.h \ + $(TAO_ROOT)/tao/DomainC.i \ + $(TAO_ROOT)/tao/POAS.i \ + $(TAO_ROOT)/tao/Active_Object_Map.h \ + $(TAO_ROOT)/tao/Active_Object_Map.i \ + $(TAO_ROOT)/tao/Object_Adapter.i \ + $(TAO_ROOT)/tao/POAManager.h \ + $(TAO_ROOT)/tao/POAManager.i \ + $(TAO_ROOT)/tao/RTCORBAC.h \ + $(TAO_ROOT)/tao/RTCORBAC.i \ + $(TAO_ROOT)/tao/POA.i \ + $(TAO_ROOT)/tao/Stub.h \ + $(TAO_ROOT)/tao/Pluggable.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(TAO_ROOT)/tao/Pluggable.i \ + $(TAO_ROOT)/tao/MProfile.h \ + $(TAO_ROOT)/tao/Profile.h \ + $(TAO_ROOT)/tao/Tagged_Components.h \ + $(TAO_ROOT)/tao/CONV_FRAMEC.h \ + $(TAO_ROOT)/tao/CONV_FRAMEC.i \ + $(TAO_ROOT)/tao/Tagged_Components.i \ + $(TAO_ROOT)/tao/Profile.i \ + $(TAO_ROOT)/tao/MProfile.i \ + $(TAO_ROOT)/tao/Stub.i \ + $(TAO_ROOT)/tao/params.h \ + $(TAO_ROOT)/tao/params.i \ + $(TAO_ROOT)/tao/ORB_Core.h \ + $(TAO_ROOT)/tao/Policy_Manager.h \ + $(TAO_ROOT)/tao/Policy_Manager.i \ + $(TAO_ROOT)/tao/Resource_Factory.h \ + $(TAO_ROOT)/tao/Protocol_Factory.h \ + $(TAO_ROOT)/tao/ORB_Core.i \ + $(ACE_ROOT)/ace/Dynamic_Service.h \ + $(ACE_ROOT)/ace/Dynamic_Service.cpp \ + $(TAO_ROOT)/tao/Operation_Table.h \ + $(TAO_ROOT)/tao/debug.h \ + $(TAO_ROOT)/tao/Client_Strategy_Factory.h \ + $(TAO_ROOT)/tao/Invocation.h \ + $(TAO_ROOT)/tao/Reply_Dispatcher.h \ + $(TAO_ROOT)/tao/GIOP_Message_State.h \ + $(TAO_ROOT)/tao/Pluggable_Messaging.h \ + $(TAO_ROOT)/tao/Pluggable_Messaging_Utils.h \ + $(TAO_ROOT)/tao/Pluggable_Messaging_Utils.i \ + $(TAO_ROOT)/tao/Pluggable_Messaging.i \ + $(TAO_ROOT)/tao/GIOP_Message_State.i \ + $(TAO_ROOT)/tao/Reply_Dispatcher.i \ + $(TAO_ROOT)/tao/TAOC.h \ + $(TAO_ROOT)/tao/TAOC.i \ + $(TAO_ROOT)/tao/operation_details.h \ + $(TAO_ROOT)/tao/target_specification.h \ + $(TAO_ROOT)/tao/target_specification.i \ + $(TAO_ROOT)/tao/operation_details.i \ + $(TAO_ROOT)/tao/Invocation.i \ + $(TAO_ROOT)/tao/InconsistentTypeCodeC.h \ + $(TAO_ROOT)/tao/DynAny_i.h \ + $(TAO_ROOT)/tao/ValueBase.h \ + $(TAO_ROOT)/tao/ValueBase.i \ + $(TAO_ROOT)/tao/ValueFactory.h \ + $(TAO_ROOT)/tao/ValueFactory.i \ + $(TAO_ROOT)/tao/ObjectIDList.h \ + $(TAO_ROOT)/tao/ObjectIDList.i \ + $(TAO_ROOT)/tao/WrongTransactionC.h \ + $(TAO_ROOT)/tao/InterfaceC.h \ + $(TAO_ROOT)/tao/ifrfwd.h \ + $(TAO_ROOT)/tao/BoundsC.h \ + $(TAO_ROOT)/tao/BoundsC.i \ + $(TAO_ROOT)/tao/MessagingS.h \ + $(TAO_ROOT)/tao/TimeBaseS.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.h \ + $(TAO_ROOT)/tao/TimeBaseS_T.i \ + $(TAO_ROOT)/tao/TimeBaseS_T.cpp \ + $(TAO_ROOT)/tao/TimeBaseS.i \ + $(TAO_ROOT)/tao/MessagingS_T.h \ + $(TAO_ROOT)/tao/MessagingS_T.i \ + $(TAO_ROOT)/tao/MessagingS_T.cpp \ + $(TAO_ROOT)/tao/MessagingS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Notify/notify_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotificationS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventCommS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyCommS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyFilterS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosEventChannelAdminS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminC.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminS_T.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminS_T.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminS_T.cpp \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNotifyChannelAdminS.i \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/Naming/naming_export.h \ + $(TAO_ROOT)/orbsvcs/orbsvcs/CosNamingC.i + +# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/Notify/Basic/README b/TAO/orbsvcs/tests/Notify/Basic/README new file mode 100644 index 00000000000..186a71aff01 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Basic/README @@ -0,0 +1,4 @@ +Test for Update + +This test will check if the subscription and publication update messages +from the event channel are properly received from the Notify Service. diff --git a/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp b/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp new file mode 100644 index 00000000000..f38ef60a4b1 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Basic/Updates.cpp @@ -0,0 +1,32 @@ +//$Id$ + +#include "Updates.h" + +ACE_RCSID (Notify_Tests, Notify_Test_Updates_Client, "$Id$") + +Notify_Test_Updates_Client::Notify_Test_Updates_Client (void) +{ +} + +Notify_Test_Updates_Client::~Notify_Test_Updates_Client () +{ +} + +void +Notify_Test_Updates_Client::init_concrete (int argc, char *argv [], CORBA::Environment &ACE_TRY_ENV) +{ +} + +void +Notify_Test_Updates_Client::run_test (CORBA::Environment &ACE_TRY_ENV) +{ +} + +/***************************************************************************/ +int +main (int argc, char* argv[]) +{ + Notify_Test_Updates_Client client; + + return Notify_Test_Client::main (argc, argv, client); +} diff --git a/TAO/orbsvcs/tests/Notify/Basic/Updates.h b/TAO/orbsvcs/tests/Notify/Basic/Updates.h new file mode 100644 index 00000000000..b896186dfa8 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Basic/Updates.h @@ -0,0 +1,37 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = FILENAME +// Updates.h +// +// = DESCRIPTION +// Test to check if <offer_change> and <subscription_change> messages are +// received correctly. +// +// = AUTHOR +// Pradeep Gore <pradeep@cs.wustl.edu> +// +// ========================================================================== + +#ifndef NOTIFY_TESTS_UPDATES_H +#define NOTIFY_TESTS_UPDATES_H + +#include "Notify_Test_Client.h" + +class Notify_Test_Updates_Client : public Notify_Test_Client +{ + public: + // Initialization and termination code + Notify_Test_Updates_Client (void); + virtual ~Notify_Test_Updates_Client (); + + virtual void init_concrete (int argc, char *argv [], CORBA::Environment &ACE_TRY_ENV); + // initialization. + + virtual void run_test (CORBA::Environment &ACE_TRY_ENV); + // Run the test. + +}; + +#endif /* NOTIFY_TESTS_UPDATES_H */ diff --git a/TAO/orbsvcs/tests/Notify/Makefile b/TAO/orbsvcs/tests/Notify/Makefile new file mode 100644 index 00000000000..55f51374da2 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Makefile @@ -0,0 +1,28 @@ +#---------------------------------------------------------------------------- +# +# $Id$ +# +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +# Local macros +#---------------------------------------------------------------------------- + +DIRS = lib \ + Basic + + +ifndef TAO_ROOT + TAO_ROOT = $(ACE_ROOT)/TAO +endif + +#---------------------------------------------------------------------------- +# Include macros and targets +#---------------------------------------------------------------------------- + +include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU +include $(ACE_ROOT)/include/makeinclude/macros.GNU +include $(TAO_ROOT)/rules.tao.GNU +include $(ACE_ROOT)/include/makeinclude/rules.common.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU +include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp new file mode 100644 index 00000000000..d56cdf1a335 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.cpp @@ -0,0 +1,169 @@ +// $Id$ + +#include "Notify_Test_Client.h" + +ACE_RCSID(Notify_Tests, Notify_Test_Client, "$Id$") + +#define NOTIFY_FACTORY_NAME "NotifyEventChannelFactory" +#define NAMING_SERVICE_NAME "NameService" + +int +Notify_Test_Client::main (int argc, char *argv [], Notify_Test_Client& client) +{ + ACE_TRY_NEW_ENV + { + client.init (argc, argv, + ACE_TRY_ENV); //Init the Client + ACE_TRY_CHECK; + + client.run_test (ACE_TRY_ENV); + ACE_TRY_CHECK; + + client.shutdown (ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCH (CORBA::UserException, ue) + { + ACE_PRINT_EXCEPTION (ue, + "Notify_Test_Client user error: "); + return 1; + } + ACE_CATCH (CORBA::SystemException, se) + { + ACE_PRINT_EXCEPTION (se, + "Notify_Test_Client system error: "); + return 1; + } + ACE_ENDTRY; + + return 0; +} + +Notify_Test_Client::Notify_Test_Client (void) +{ + // @@ Later: accept the inter filter operator as a param. + ifgop_ = CosNotifyChannelAdmin::OR_OP; +} + +Notify_Test_Client::~Notify_Test_Client () +{ +} + +void +Notify_Test_Client::init (int argc, char *argv [], CORBA::Environment &ACE_TRY_ENV) +{ + this->init_ORB (argc, argv, ACE_TRY_ENV); + ACE_CHECK; + this->resolve_naming_service (ACE_TRY_ENV); + ACE_CHECK; + this->resolve_Notify_factory (ACE_TRY_ENV); + ACE_CHECK; + this->create_EC (ACE_TRY_ENV); + ACE_CHECK; + + this->init_concrete (argc, argv, ACE_TRY_ENV); +} + +void +Notify_Test_Client::init_ORB (int argc, + char *argv [], + CORBA::Environment &ACE_TRY_ENV) +{ + this->orb_ = CORBA::ORB_init (argc, + argv, + "", + ACE_TRY_ENV); + ACE_CHECK; + + CORBA::Object_ptr poa_object = + this->orb_->resolve_initial_references("RootPOA", + ACE_TRY_ENV); + ACE_CHECK; + + if (CORBA::is_nil (poa_object)) + { + ACE_ERROR ((LM_ERROR, + " (%P|%t) Unable to initialize the POA.\n")); + return; + } + this->root_poa_ = + PortableServer::POA::_narrow (poa_object, ACE_TRY_ENV); + ACE_CHECK; + + PortableServer::POAManager_var poa_manager = + root_poa_->the_POAManager (ACE_TRY_ENV); + ACE_CHECK; + + poa_manager->activate (ACE_TRY_ENV); + ACE_CHECK; +} + +void +Notify_Test_Client::resolve_naming_service (CORBA::Environment &ACE_TRY_ENV) +{ + CORBA::Object_var naming_obj = + this->orb_->resolve_initial_references (NAMING_SERVICE_NAME, + ACE_TRY_ENV); + ACE_CHECK; + + // Need to check return value for errors. + if (CORBA::is_nil (naming_obj.in ())) + ACE_THROW (CORBA::UNKNOWN ()); + + this->naming_context_ = + CosNaming::NamingContext::_narrow (naming_obj.in (), ACE_TRY_ENV); + ACE_CHECK; +} + +void +Notify_Test_Client::resolve_Notify_factory (CORBA::Environment &ACE_TRY_ENV) +{ + CosNaming::Name name (1); + name.length (1); + name[0].id = CORBA::string_dup (NOTIFY_FACTORY_NAME); + + CORBA::Object_var obj = + this->naming_context_->resolve (name, + ACE_TRY_ENV); + ACE_CHECK; + + this->notify_factory_ = + CosNotifyChannelAdmin::EventChannelFactory::_narrow (obj.in (), + ACE_TRY_ENV); + ACE_CHECK; +} + +void +Notify_Test_Client::create_EC (CORBA::Environment &ACE_TRY_ENV) +{ + CosNotifyChannelAdmin::ChannelID id; + + ec_ = notify_factory_->create_channel (initial_qos_, + initial_admin_, + id, + ACE_TRY_ENV); + ACE_CHECK; + + ACE_ASSERT (!CORBA::is_nil (ec_.in ())); +} + + +int +Notify_Test_Client::ORB_run (void) +{ + if (this->orb_->run () == -1) + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "run"), -1); + + return 0; +} + +void +Notify_Test_Client::shutdown (CORBA::Environment &ACE_TRY_ENV) +{ + // Destroy the channel + this->ec_->destroy (ACE_TRY_ENV); + + // shutdown the ORB. + if (!CORBA::is_nil (this->orb_.in ())) + this->orb_->shutdown (); +} diff --git a/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h new file mode 100644 index 00000000000..1047885c5a9 --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/lib/Notify_Test_Client.h @@ -0,0 +1,95 @@ +/* -*- C++ -*- */ +// $Id$ +// ========================================================================== +// +// = FILENAME +// Notify_Test_Client.h +// +// = DESCRIPTION +// Prototype Test Driver for all the Notify tests. +// +// = AUTHOR +// Pradeep Gore <pradeep@cs.wustl.edu> +// +// ========================================================================== + +#ifndef NOTIFY_TEST_CLIENT_H +#define NOTIFY_TEST_CLIENT_H + +#include "orbsvcs/CosNotifyChannelAdminS.h" +#include "orbsvcs/CosNotifyCommC.h" +#include "orbsvcs/CosNamingC.h" + +class Notify_Test_Client +{ + // = TITLE + // Notify_Test_Client + // = DESCRIPTION + // Shows how consumers Notify_Test_Client for events. + + public: + // = Initialization and Termination + Notify_Test_Client (void); + virtual ~Notify_Test_Client (); + + static int main (int argc, char *argv [], Notify_Test_Client& client); + // Handles the generic 'main' entry operations. + + virtual void init (int argc, char *argv [], CORBA::Environment &ACE_TRY_ENV); + // Init the Client. + + int ORB_run (void); + // Call ORB::run to accept requests. + + void shutdown (CORBA::Environment &ACE_TRY_ENV); + // Shutdown the ORB, destroy the event channel. + + virtual void init_concrete (int argc, char *argv [], CORBA::Environment &ACE_TRY_ENV) = 0; + // Abstract method to be overloaded by the concrete prototype. + // This is called from <init> to allow the concrete prototype to do its + // initialization. + + virtual void run_test (CORBA::Environment &ACE_TRY_ENV) = 0; + // Run the test. + // The concrete prototype must implement this. + + protected: + void init_ORB (int argc, char *argv [], CORBA::Environment &ACE_TRY_ENV); + // Initializes the ORB. + + void resolve_naming_service (CORBA::Environment &ACE_TRY_ENV); + // Try to get hold of a running naming service. + + void resolve_Notify_factory (CORBA::Environment &ACE_TRY_ENV); + // Try to resolve the Notify factory from the Naming service. + + void create_EC (CORBA::Environment &ACE_TRY_ENV); + // Create an EC. + + // = Data Members + PortableServer::POA_var root_poa_; + // Reference to the root poa. + + CORBA::ORB_var orb_; + // The ORB that we use. + + CosNaming::NamingContext_var naming_context_; + // Handle to the name service. + + CosNotifyChannelAdmin::EventChannelFactory_var notify_factory_; + // Channel factory. + + CosNotifyChannelAdmin::EventChannel_var ec_; + // The one channel that we create using the factory. + + CosNotifyChannelAdmin::InterFilterGroupOperator ifgop_; + // The group operator between admin-proxy's. + + CosNotification::QoSProperties initial_qos_; + // Initial qos specified to the factory when creating the EC. + + CosNotification::AdminProperties initial_admin_; + // Initial admin props specified to the factory when creating the EC. +}; + +#endif /* NOTIFY_TEST_CLIENT_H */ |