[asterisk-scf-commits] asterisk-scf/integration/servicediscovery.git branch "icebox" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Oct 1 15:00:18 CDT 2010


branch "icebox" has been updated
       via  597a3dab1506b92d947eb749f5c8e1becceabb52 (commit)
       via  3bb6fbf86fda0fcc479fdd4997e40f4691c078dd (commit)
      from  cfe7ba1d0262af2630142f606ebd2d7f6666471d (commit)

Summary of changes:
 config/test_component.config       |   18 +++-----
 config/test_icestorm.config        |   30 --------------
 config/test_service_locator.config |   28 +++++++++++++
 slice                              |    2 +-
 src/CMakeLists.txt                 |    5 ++
 src/CollocatedIceStorm.cpp         |   74 ++++++++++++++++++++++++++++++++++++
 src/CollocatedIceStorm.h           |   45 ++++++++++++++++++++++
 src/ServiceLocator.cpp             |    5 ++
 8 files changed, 165 insertions(+), 42 deletions(-)
 delete mode 100644 config/test_icestorm.config
 create mode 100644 src/CollocatedIceStorm.cpp
 create mode 100644 src/CollocatedIceStorm.h


- Log -----------------------------------------------------------------
commit 597a3dab1506b92d947eb749f5c8e1becceabb52
Merge: cfe7ba1 3bb6fbf
Author: Brent Eagles <beagles at digium.com>
Date:   Fri Oct 1 17:22:56 2010 -0230

    Merged collocated ice storm changes from master

diff --cc config/test_component.config
index 9452d0f,0000000..123519d
mode 100755,000000..100755
--- a/config/test_component.config
+++ b/config/test_component.config
@@@ -1,53 -1,0 +1,49 @@@
 +# This is a configuration file used in conjunction with the service discovery test driver
- 
- IceBox.Service.IceStorm=IceStormService,34:createIceStorm --Ice.Config=config/test_component.config
- 
- IceStorm.InstanceName=HydraIceStorm
- 
++HydraIceStorm.InstanceName=HydraIceStorm
 +#
 +# This property defines the endpoints on which the IceStorm
 +# TopicManager listens.
 +#
- IceStorm.TopicManager.Endpoints=default -p 10000
++HydraIceStorm.TopicManager.Endpoints=default -p 10000
 +
 +#
 +# This property defines the endpoints on which the topic
 +# publisher objects listen. If you want to federate
 +# IceStorm instances this must run on a fixed port (or use
 +# IceGrid).
 +#
- IceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
++HydraIceStorm.Publish.Endpoints=tcp -p 10001:udp -p 10001
 +
 +#
 +# TopicManager Tracing
 +#
 +# 0 = no tracing
 +# 1 = trace topic creation, subscription, unsubscription
 +# 2 = like 1, but with more detailed subscription information
 +#
- IceStorm.Trace.TopicManager=2
++HydraIceStorm.Trace.TopicManager=2
 +
 +#
- IceStorm.Flush.Timeout=2000
++HydraIceStorm.Flush.Timeout=2000
 +
 +#
 +# ServiceDiscovery configuration
 +#
- IceBox.Service.ServiceDiscovery=../src/service_locator:create --Ice.Config=config/test_component.config
++IceBox.Service.ServiceDiscovery=../src/service_locator:create --Ice.Config=/home/brent/src/asteriskscf/servicediscovery/config/test_component.config
 +
 +# Test endpoints for the service locator management adapter
 +ServiceLocatorManagementAdapter.Endpoints=tcp -p 4422
 +
 +# Test endpoints for the service locator adapter
 +ServiceLocatorAdapter.Endpoints=tcp -p 4411
 +
 +# Test endpoints for IceStorm
 +TopicManager.Proxy=HydraIceStorm/TopicManager:default -p 10000
 +
 +#
 +# test configuration
 +#
- IceBox.Service.ServiceDiscoveryTest=./service_locator_test:create --Ice.Config=config/test_component.config --report_sink=${CMAKE_BINARY_DIR}/service_locator_test-result.xml --report_format=XML --report_level=detailed
++IceBox.Service.ServiceDiscoveryTest=./service_locator_test:create --Ice.Config=/home/brent/src/asteriskscf/servicediscovery/config/test_component.config --report_sink=${CMAKE_BINARY_DIR}/service_locator_test-result.xml --report_format=XML --report_level=detailed
 +
 +LocatorService.Proxy=LocatorService:tcp -p 4411
 +ServiceLocatorManagement.proxy=ServiceLocatorManagement:tcp -p 4422
diff --cc src/CMakeLists.txt
index da579bd,17f592e..daadb06
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@@ -13,7 -13,12 +13,12 @@@ hydra_component_add_slice(service_locat
  hydra_component_add_file(service_locator ServiceLocator.cpp)
  hydra_component_add_file(service_locator ServiceLocatorManagement.cpp)
  hydra_component_add_file(service_locator ServiceManagement.cpp)
+ hydra_component_add_file(service_locator CollocatedIceStorm.cpp)
+ hydra_component_add_file(service_locator CollocatedIceStorm.h)
+ hydra_component_add_file(service_locator ServiceManagement.h)
+ hydra_component_add_file(service_locator ServiceLocatorManagement.h)
  hydra_component_add_ice_libraries(service_locator IceStorm)
+ hydra_component_add_ice_libraries(service_locator IceBox)
  hydra_component_add_boost_libraries(service_locator core thread)
 -hydra_component_build_standalone(service_locator)
 -hydra_component_install(service_locator RUNTIME bin "Service Locator." Core)
 +hydra_component_build_icebox(service_locator)
 +#hydra_component_install(service_locator RUNTIME bin "Service Locator." Core)
diff --cc src/ServiceLocator.cpp
index f166ad6,a5ac3ba..37a133e
--- a/src/ServiceLocator.cpp
+++ b/src/ServiceLocator.cpp
@@@ -23,16 -23,14 +24,17 @@@ using namespace AsteriskSCF::Core::Disc
  /**
   * Implementation of the Ice::Application class
   */
 -class ServiceLocatorApp : public Ice::Application
 +class ServiceLocatorApp : public IceBox::Service
  {
  public:
 -	int run(int, char*[]);
 -	void interruptCallback(int);
 +   void start(const std::string&,
 +              const Ice::CommunicatorPtr&,
 +              const Ice::StringSeq&);
 +   void stop();
  
  private:
 -        CollocatedIceStormPtr mIceStorm;
 +   Ice::ObjectAdapterPtr discovery_adapter;
++   CollocatedIceStormPtr mIceStorm;
  };
  
  /**
@@@ -70,11 -78,13 +72,13 @@@ Ice::ObjectProxySeq ServiceLocatorImpl:
  	return mLocatorServiceManagement->locateAll(params);
  }
  
 -/**
 - * Overload of the Ice::Application::run method.
 - */
 -int ServiceLocatorApp::run(int argc, char* argv[])
 +void ServiceLocatorApp::start(
 +    const string& name,
 +    const Ice::CommunicatorPtr& communicator,
 +    const Ice::StringSeq& args)
  {
 -    mIceStorm = new CollocatedIceStorm("HydraIceStorm", communicator()->getProperties());
++    mIceStorm = new CollocatedIceStorm("HydraIceStorm", communicator->getProperties());
+ 
  	cout << "[INFO] Initializing service discovery component" << endl;
  
  	/* Talk to the topic manager to either create or get the service discovery topic, configured or default */
@@@ -142,17 -152,16 +146,18 @@@
  	cout << "[INFO] Activated service discovery." << endl;
  
  	cout << "[INFO] Waiting for requests." << endl;
 +}
  
 -	/* Now that management and discovery are active we just sit here waiting until we shutdown */
 -	communicator()->waitForShutdown();
 -
 -        mIceStorm->stop();
 -
 -	return EXIT_SUCCESS;
 +void ServiceLocatorApp::stop()
 +{
 +   discovery_adapter->deactivate();
++   mIceStorm->stop();
  }
  
 -void ServiceLocatorApp::interruptCallback(int val)
 +extern "C"
  {
 -	_exit(EXIT_SUCCESS);
 +   IceBox::Service* create(Ice::CommunicatorPtr communicator)
 +   {
 +      return new ServiceLocatorApp;
 +   }
  }

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/servicediscovery.git



More information about the asterisk-scf-commits mailing list