[hydra-commits] hydra/team/ken.hunt/routing.git branch "master" updated.
Commits to the Hydra project code repositories
hydra-commits at lists.digium.com
Sun Aug 15 19:53:57 CDT 2010
branch "master" has been updated
via a52965f3ae92dc2717f2227b243b264e31788069 (commit)
via 6fa7b2f7cc34abd24d960e33925042f08e492c3f (commit)
from acc1a6f6f6518dc4c76645b691d64de0a2ab0cf1 (commit)
Summary of changes:
CMakeLists.txt | 2 +-
config/basicrouting.config | 11 +
config/icestorm.config | 30 +++
scripts/routing.lua | 24 +++
src/BasicRoutingServiceApp.cpp | 2 +-
...ServiceApp.h => BasicRoutingServiceDataModel.h} | 0
src/CMakeLists.txt | 2 +-
src/EndpointRegistry.cpp | 33 +++-
src/RoutingAdmin.cpp | 2 +-
src/RoutingServiceEventPublisher.cpp | 14 +-
src/RoutingServiceEventPublisher.h | 12 +-
test/CMakeLists.txt | 9 +
test/TestRouting.cpp | 212 ++++++++++++++++++++
13 files changed, 333 insertions(+), 20 deletions(-)
create mode 100644 config/basicrouting.config
create mode 100644 config/icestorm.config
create mode 100644 scripts/routing.lua
rename src/{BasicRoutingServiceApp.h => BasicRoutingServiceDataModel.h} (100%)
create mode 100644 test/CMakeLists.txt
create mode 100644 test/TestRouting.cpp
- Log -----------------------------------------------------------------
commit a52965f3ae92dc2717f2227b243b264e31788069
Author: Ken Hunt <ken.hunt at digium.com>
Date: Sun Aug 15 19:51:18 2010 -0500
Added test driver.
diff --git a/config/basicrouting.config b/config/basicrouting.config
new file mode 100644
index 0000000..46074bc
--- /dev/null
+++ b/config/basicrouting.config
@@ -0,0 +1,11 @@
+# This is a configuration file for the Basic Routing Service
+
+# Basic routing service
+BasicRoutingServiceAdapter.Endpoints=tcp -p 10054
+
+# Basic routing service admin
+BasicRoutingServiceAdminAdapter.Endpoints=tcp -p 10055
+
+# Endpoints for Icestorm events
+TopicManager.Proxy=HydraIceStorm/TopicManager:default -p 10012
+
diff --git a/config/icestorm.config b/config/icestorm.config
new file mode 100644
index 0000000..62aeb7f
--- /dev/null
+++ b/config/icestorm.config
@@ -0,0 +1,30 @@
+# This is a configuration file used in conjunction with the service discovery test driver
+
+IceBox.Service.IceStorm=IceStormService,34:createIceStorm --Ice.Config=../config/test_icestorm.config
+
+IceStorm.InstanceName=HydraIceStorm
+#
+# This property defines the endpoints on which the IceStorm
+# TopicManager listens.
+#
+IceStorm.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
+
+#
+# TopicManager Tracing
+#
+# 0 = no tracing
+# 1 = trace topic creation, subscription, unsubscription
+# 2 = like 1, but with more detailed subscription information
+#
+IceStorm.Trace.TopicManager=2
+
+#
+IceStorm.Flush.Timeout=2000
diff --git a/scripts/routing.lua b/scripts/routing.lua
new file mode 100644
index 0000000..3b736df
--- /dev/null
+++ b/scripts/routing.lua
@@ -0,0 +1,24 @@
+
+
+-- Sets a site-specific policy. The default implementation only
+-- supports a "deny" policy which rejects all lookups until
+-- the policy no longer equals "deny".
+function setPolicy(newpolicy)
+ policy = newpolicy
+end
+
+-- Confirm or deny a lookup() procedure.
+-- @param destination The destination being looked up
+-- @return A (potentially) modified destination to allow rerouting.
+-- @return True to allow the lookup or false to deny.
+function confirmLookup(destination)
+ print ("Looking up extension "..destination)
+ return destination
+
+ if (policy == "deny")
+ return false;
+ else
+ return true
+ end
+end
+
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..8d0b1e7
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Create Basic Routing Service test project.
+hydra_component_init(RoutingTest CXX)
+hydra_component_add_slice(RoutingTest RoutingIf)
+hydra_component_add_slice(RoutingTest ServiceLocatorIf)
+hydra_component_add_file(RoutingTest TestRouting.cpp)
+hydra_component_add_ice_libraries(RoutingTest IceStorm)
+hydra_component_add_boost_libraries(RoutingTest unit_test_framework)
+hydra_component_build_standalone(RoutingTest)
+hydra_component_install(RoutingTest RUNTIME bin "Routing Service Test Driver." Test)
diff --git a/test/TestRouting.cpp b/test/TestRouting.cpp
new file mode 100644
index 0000000..dafa158
--- /dev/null
+++ b/test/TestRouting.cpp
@@ -0,0 +1,212 @@
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE ServiceLocatorTestSuite
+#define BOOST_TEST_NO_MAIN
+
+#include <boost/test/unit_test.hpp>
+#include <boost/test/debug.hpp>
+
+#include <Ice/Ice.h>
+
+#include "Core/Routing/RoutingIf.h"
+#include "Core/Discovery/ServiceLocatorIf.h"
+
+using namespace std;
+using namespace Hydra::Core::Routing::V1;
+using namespace Hydra::Core::Endpoint::V1;
+
+/**
+ * A locator for our test channel's endpoints.
+ */
+typedef EndpointSeq::iterator EndpointIterator;
+class TestEndpointLocatorImpl : public EndpointLocator
+{
+public:
+ EndpointSeq lookup(const ::std::string& destination, const Ice::Current&)
+ {
+ EndpointSeq endpoints;
+
+ for (EndpointIterator e=mEndpoints.begin(); e!= mEndpoints.end(); e++)
+ {
+ BaseEndpointPtr ep = *e;
+ if ((*e)->id->destinationId == destination)
+ {
+ endpoints.push_back(*e);
+ }
+ }
+
+ if (endpoints.size() == 0)
+ {
+ throw DestinationNotFoundException(destination);
+ }
+ return endpoints;
+ }
+
+ EndpointSeq mEndpoints;
+};
+typedef ::IceInternal::Handle<TestEndpointLocatorImpl> TestEndpointLocatorImplPtr;
+
+/* Cache the command line arguments so that Ice can be initialized within the global fixture. */
+struct ArgCacheType
+{
+public:
+ int argc;
+ char **argv;
+};
+static ArgCacheType mCachedArgs;
+
+/**
+ * It seems odd that boost doesn't provide an easy way to access the GLOBAL_FIXTURE members.
+ * But it doesn't seem to, so I'm sharing global setup stuff here.
+ */
+struct SharedTestData
+{
+public:
+ // Communicator for outgoing stuff
+ Ice::CommunicatorPtr communicator_outgoing;
+
+ // Communicator for incoming stuff
+ Ice::CommunicatorPtr communicator_incoming;
+
+ Ice::ObjectAdapterPtr adapter;
+
+ //A proxy to the actual routing service
+ LocatorRegistryPrx locatorRegistry;
+
+ // Our own EndpointLocator to server up endpoints to the RoutingService, emulating a channel.
+ TestEndpointLocatorImplPtr mEndpointLocator;
+ EndpointLocatorPrx mEndpointLocatorPrx;
+ //std::vector<const std::string> mRegExIds;
+ RegExSeq mRegExIds;
+};
+static SharedTestData Testbed;
+
+/**
+ * A global fixture for Ice initialization.
+ * Provides setup/teardown for the entire set of tests.
+ */
+struct GlobalIceFixture
+{
+ GlobalIceFixture()
+ {
+ BOOST_TEST_MESSAGE("Setting up Basic Rounting Service test fixture");
+
+ ::boost::debug::detect_memory_leaks(false);
+ ::boost::unit_test::unit_test_log.set_stream( std::cout );
+
+ int status = 0;
+ try
+ {
+ Testbed.communicator_incoming = Ice::initialize(mCachedArgs.argc, mCachedArgs.argv);
+
+ //Ice::ObjectFactoryPtr baseEndpointFactory = new BaseEndpointFactory();
+ //Testbed.communicator_incoming->addObjectFactory(baseEndpointFactory, Hydra::Core::Endpoint::V1::BaseEndpoint::ice_staticId());
+
+ // Serve up our own EndpointLocator, since we're emulating a channel.
+ TestEndpointLocatorImpl *locator = new TestEndpointLocatorImpl();
+ Testbed.mEndpointLocator = locator;
+ Testbed.adapter->add(Testbed.mEndpointLocator, Testbed.communicator_incoming->stringToIdentity("Locator"));
+
+
+ // Get ref to Routing Service so we can test it. Getting direct for now, but
+ // need to test acquiring reference via ServiceLocator as well.
+ Ice::ObjectPrx base = Testbed.communicator_incoming->stringToProxy("RoutingServiceLocatorRegistry:default -p 10047");
+ LocatorRegistryPrx server = LocatorRegistryPrx::checkedCast(base);
+
+ Testbed.adapter = Testbed.communicator_incoming->createObjectAdapterWithEndpoints("RoutingServiceAdapter", "default");
+ Testbed.adapter->activate();
+
+ // Now that the adapter has been activated, get a local proxy to our EndpointLocator.
+ Ice::ObjectPrx locatorObjectPrx = Testbed.adapter->createDirectProxy(Testbed.communicator_incoming->stringToIdentity("Locator"));
+ Testbed.mEndpointLocatorPrx = EndpointLocatorPrx::checkedCast(locatorObjectPrx);
+
+ PopulateEndpoints();
+
+ if (!Testbed.locatorRegistry)
+ {
+ throw "Invalid service proxy";
+ }
+ }
+ catch (const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = 1;
+ }
+ catch (const char* msg)
+ {
+ cerr << msg << endl;
+ status = 1;
+ }
+
+ } // end Fixture() constructor
+
+ void PopulateEndpoints()
+ {
+ Testbed.mEndpointLocator->mEndpoints.clear();
+
+ BaseEndpointPtr endpoint = new BaseEndpoint();
+ endpoint->id = new EndpointId("TestChannel", "101");
+ Testbed.mEndpointLocator->mEndpoints.push_back(endpoint);
+
+ endpoint->id = new EndpointId("TestChannel", "102");
+ Testbed.mEndpointLocator->mEndpoints.push_back(endpoint);
+
+ endpoint->id = new EndpointId("TestChannel", "103");
+ Testbed.mEndpointLocator->mEndpoints.push_back(endpoint);
+
+ // Initialize the regular expressions for the ids that this channel will support.
+ // Use two strings just for kicks.
+ Testbed.mRegExIds.push_back("101");
+ Testbed.mRegExIds.push_back("10[23]"); // 102 or 103
+ }
+
+ ~GlobalIceFixture()
+ {
+ BOOST_TEST_MESSAGE("Tearing down service discovery test fixture");
+
+
+ if (Testbed.communicator_incoming)
+ {
+ Testbed.communicator_incoming->shutdown();
+ Testbed.communicator_incoming = 0;
+ }
+ if (Testbed.communicator_outgoing)
+ {
+ Testbed.communicator_outgoing->shutdown();
+ Testbed.communicator_outgoing = 0;
+ }
+ }
+private:
+
+};
+
+BOOST_GLOBAL_FIXTURE(GlobalIceFixture);
+
+/**
+ * Implement our own main to intercept the command line args.
+ * (A default main() is provided if we hadn't set BOOST_TEST_NO_MAIN at the top of file.)
+ * NOTE: Pass in --log_level=message to see the debug print statements.
+ */
+int BOOST_TEST_CALL_DECL main( int argc, char* argv[] )
+{
+ mCachedArgs.argc = argc;
+ mCachedArgs.argv = argv;
+ return ::boost::unit_test::unit_test_main( &init_unit_test, argc, argv );
+}
+
+/**
+ * Confirm that we find no service using locate before we have added one.
+ */
+BOOST_AUTO_TEST_CASE(MyFirstTest)
+{
+ bool succeeded(true);
+ try
+ {
+ Testbed.locatorRegistry->addEndpointLocator("TestChannel", Testbed.mRegExIds, Testbed.mEndpointLocatorPrx);
+ }
+ catch (...)
+ {
+ succeeded = false;
+ }
+
+ BOOST_CHECK(succeeded);
+}
commit 6fa7b2f7cc34abd24d960e33925042f08e492c3f
Author: Ken Hunt <ken.hunt at digium.com>
Date: Sun Aug 15 19:48:20 2010 -0500
Updates for test.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c83d1b..dcd7f19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,4 +16,4 @@ add_subdirectory(slice)
add_subdirectory(src)
# Finally take care of the test suite
-#add_subdirectory(test)
+add_subdirectory(test)
diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 69fc11d..3cddc8f 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -4,7 +4,7 @@
#include <boost/thread.hpp>
#include <boost/shared_ptr.hpp>
-#include "BasicRoutingServiceApp.h"
+#include "BasicRoutingServiceDataModel.h"
#include "RoutingIf.h"
#include "LuaScriptProcessor.h"
#include "RoutingServiceEventPublisher.h"
diff --git a/src/BasicRoutingServiceApp.h b/src/BasicRoutingServiceDataModel.h
similarity index 100%
rename from src/BasicRoutingServiceApp.h
rename to src/BasicRoutingServiceDataModel.h
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4ca784c..4c14ab1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,7 +6,7 @@ LINK_DIRECTORIES(${LUA_LOC})
include_directories(${LUA_INCLUDE_DIR})
hydra_component_add_slice(BasicRoutingService RoutingIf)
hydra_component_add_file(BasicRoutingService BasicRoutingServiceApp.cpp)
-hydra_component_add_file(BasicRoutingService BasicRoutingServiceApp.h)
+hydra_component_add_file(BasicRoutingService BasicRoutingServiceDataModel.h)
hydra_component_add_file(BasicRoutingService RoutingAdmin.cpp)
hydra_component_add_file(BasicRoutingService RoutingAdmin.h)
hydra_component_add_file(BasicRoutingService EndpointRegistry.cpp)
diff --git a/src/EndpointRegistry.cpp b/src/EndpointRegistry.cpp
index 82316a3..80d9081 100644
--- a/src/EndpointRegistry.cpp
+++ b/src/EndpointRegistry.cpp
@@ -1,5 +1,7 @@
#include <boost/regex.hpp>
+#include "BasicRoutingServiceDataModel.h"
+#include "RoutingServiceEventPublisher.h"
#include "EndpointRegistry.h"
#include "ScriptProcessor.h"
@@ -15,7 +17,8 @@ struct RegisteredLocator
{
public:
RegisteredLocator() {};
- RegisteredLocator(EndpointLocatorPrx l, const RegExSeq &inputStringList) : locator(l)
+ RegisteredLocator(EndpointLocatorPrx l, const RegExSeq &inputStringList)
+ : locator(l)
{
setRegEx(inputStringList);
}
@@ -44,8 +47,13 @@ public:
class EndpointRegistryPriv
{
public:
+ EndpointRegistryPriv() : mEventPublisher(BasicRoutingServiceDataModel::getInstance().getEventPublisher())
+ {
+ }
+
map<std::string, RegisteredLocator> mEndpointLocatorMap;
boost::shared_ptr<ScriptProcessor> mScriptProcessor;
+ const RoutingServiceEventPublisher& mEventPublisher;
};
typedef map<std::string, RegisteredLocator>::iterator EndpointLocatorMapIterator;
@@ -72,17 +80,20 @@ void EndpointRegistry::addEndpointLocator(const ::std::string& locatorId,
EndpointLocatorMapIterator existing = mImpl->mEndpointLocatorMap.find(locatorId);
if (existing != mImpl->mEndpointLocatorMap.end())
{
- throw LocatorAlreadyRegisteredException(locatorId);
+ mImpl->mEventPublisher.sendAddEndpointLocatorEvent(locatorId, regexList, Event::FAILURE);
+ throw LocatorAlreadyRegisteredException(locatorId);
}
RegisteredLocator newLocator(locator, regexList);
mImpl->mEndpointLocatorMap[locatorId] = newLocator;
+ mImpl->mEventPublisher.sendAddEndpointLocatorEvent(locatorId, regexList, Event::SUCCESS);
}
catch (...)
{
// TBD... Logging!
cout << "Exception adding EndpointLocator." << endl;
+ mImpl->mEventPublisher.sendAddEndpointLocatorEvent(locatorId, regexList, Event::FAILURE);
return;
}
}
@@ -96,9 +107,11 @@ void EndpointRegistry::removeEndpointLocator(const ::std::string& locatorId, con
try
{
mImpl->mEndpointLocatorMap.erase(locatorId);
+ mImpl->mEventPublisher.sendRemoveEndpointLocatorEvent(locatorId, Event::SUCCESS);
}
catch(const std::exception &e)
{
+ mImpl->mEventPublisher.sendRemoveEndpointLocatorEvent(locatorId, Event::FAILURE);
// TBD... Logging!
cout << e.what() << endl;
}
@@ -119,14 +132,18 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(const ::std::string& loc
EndpointLocatorMapIterator existing = mImpl->mEndpointLocatorMap.find(locatorId);
if (existing == mImpl->mEndpointLocatorMap.end())
{
- throw DestinationNotFoundException(locatorId);
+ mImpl->mEventPublisher.sendSetEndpointLocatorDestinationIdsEvent(locatorId, regExList, Event::FAILURE);
+ throw DestinationNotFoundException(locatorId);
}
// Replace the regular expression.
existing->second.setRegEx(regExList);
+ mImpl->mEventPublisher.sendSetEndpointLocatorDestinationIdsEvent(locatorId, regExList, Event::SUCCESS);
+
}
catch(const std::exception &e)
{
+ mImpl->mEventPublisher.sendSetEndpointLocatorDestinationIdsEvent(locatorId, regExList, Event::FAILURE);
// TBD... Logging!
cout << "Exception modifying the destination specifications for EndpointLocator " << locatorId << endl;
cout << " - " << e.what() << endl;
@@ -145,6 +162,7 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(const ::std::string& loc
string modifiedDestination;
if (!mImpl->mScriptProcessor->confirmLookup(destination, modifiedDestination))
{
+ mImpl->mEventPublisher.sendLookupEvent(destination, Event::FAILURE);
// TBD.. logging
cout << "lookup(): denied by confirmLookup() script." << endl;
return endpoints;
@@ -165,6 +183,13 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(const ::std::string& loc
}
}
+ Event::OperationResult result(Event::FAILURE);
+ if (endpoints.size() > 0)
+ {
+ result = Event::SUCCESS;
+ }
+ mImpl->mEventPublisher.sendLookupEvent(destination, result);
+
return endpoints;
}
@@ -183,6 +208,7 @@ void EndpointRegistry::setScriptProcessor(boost::shared_ptr<ScriptProcessor> scr
void EndpointRegistry::clearEndpointLocators()
{
mImpl->mEndpointLocatorMap.clear();
+ mImpl->mEventPublisher.sendClearEndpointLocatorsEvent();
}
/**
@@ -194,6 +220,7 @@ void EndpointRegistry::clearEndpointLocators()
void EndpointRegistry::setPolicy(::std::string policy)
{
mImpl->mScriptProcessor->setPolicy(policy);
+ mImpl->mEventPublisher.sendSetPolicyEvent(policy);
}
}; // end BasicRoutingService
diff --git a/src/RoutingAdmin.cpp b/src/RoutingAdmin.cpp
index 6a02280..0783102 100644
--- a/src/RoutingAdmin.cpp
+++ b/src/RoutingAdmin.cpp
@@ -1,7 +1,7 @@
#include <boost/regex.hpp>
#include "RoutingAdmin.h"
-#include "BasicRoutingServiceApp.h"
+#include "BasicRoutingServiceDataModel.h"
#include "EndpointRegistry.h"
using namespace ::Hydra::Core::Routing::V1;
diff --git a/src/RoutingServiceEventPublisher.cpp b/src/RoutingServiceEventPublisher.cpp
index b5766c9..8b7a059 100644
--- a/src/RoutingServiceEventPublisher.cpp
+++ b/src/RoutingServiceEventPublisher.cpp
@@ -1,7 +1,7 @@
#include <Ice/Ice.h>
#include <IceStorm/IceStorm.h>
-#include "BasicRoutingServiceApp.h"
+#include "BasicRoutingServiceDataModel.h"
#include "RoutingServiceEventPublisher.h"
using namespace ::std;
@@ -93,7 +93,7 @@ RoutingServiceEventPublisher::RoutingServiceEventPublisher()
* Send a message to the service's event topic to report a lookup event.
*/
void RoutingServiceEventPublisher::sendLookupEvent(const ::std::string& destination,
- ::Hydra::Core::Routing::V1::Event::OperationResult result)
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const
{
if (!mImpl->isInitialized())
{
@@ -109,7 +109,7 @@ void RoutingServiceEventPublisher::sendLookupEvent(const ::std::string& destinat
*/
void RoutingServiceEventPublisher::sendAddEndpointLocatorEvent(const ::std::string& locatorId,
const ::Hydra::Core::Routing::V1::RegExSeq& regexList,
- ::Hydra::Core::Routing::V1::Event::OperationResult result)
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const
{
if (!mImpl->isInitialized())
{
@@ -123,7 +123,7 @@ void RoutingServiceEventPublisher::sendAddEndpointLocatorEvent(const ::std::stri
* Send a message to the service's event topic to report the removeEndpointLocator event.
*/
void RoutingServiceEventPublisher::sendRemoveEndpointLocatorEvent(const ::std::string& locatorId,
- ::Hydra::Core::Routing::V1::Event::OperationResult result)
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const
{
if (!mImpl->isInitialized())
{
@@ -138,7 +138,7 @@ void RoutingServiceEventPublisher::sendRemoveEndpointLocatorEvent(const ::std::s
*/
void RoutingServiceEventPublisher::sendSetEndpointLocatorDestinationIdsEvent(const ::std::string& locatorId,
const ::Hydra::Core::Routing::V1::RegExSeq& regexList,
- ::Hydra::Core::Routing::V1::Event::OperationResult result)
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const
{
if (!mImpl->isInitialized())
{
@@ -151,7 +151,7 @@ void RoutingServiceEventPublisher::sendSetEndpointLocatorDestinationIdsEvent(con
/**
* Send a message to the service's event topic to report the clearEndpointLocators event.
*/
-void RoutingServiceEventPublisher::sendClearEndpointLocatorsEvent()
+void RoutingServiceEventPublisher::sendClearEndpointLocatorsEvent() const
{
if (!mImpl->isInitialized())
{
@@ -164,7 +164,7 @@ void RoutingServiceEventPublisher::sendClearEndpointLocatorsEvent()
/**
* Send a message to the service's event topic to report the setPolicy event.
*/
-void RoutingServiceEventPublisher::sendSetPolicyEvent(const ::std::string& policy)
+void RoutingServiceEventPublisher::sendSetPolicyEvent(const ::std::string& policy) const
{
if (!mImpl->isInitialized())
{
diff --git a/src/RoutingServiceEventPublisher.h b/src/RoutingServiceEventPublisher.h
index d507216..f512d3f 100644
--- a/src/RoutingServiceEventPublisher.h
+++ b/src/RoutingServiceEventPublisher.h
@@ -24,7 +24,7 @@ public:
* @param result Informs event listeners of the operations success or failure.
*/
void sendLookupEvent(const ::std::string& destination,
- ::Hydra::Core::Routing::V1::Event::OperationResult result);
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const;
/**
* Send a message to the service's event topic to report an addEndpointLocator event.
@@ -34,7 +34,7 @@ public:
*/
void sendAddEndpointLocatorEvent(const ::std::string& locatorId,
const ::Hydra::Core::Routing::V1::RegExSeq& regexList,
- ::Hydra::Core::Routing::V1::Event::OperationResult result);
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const;
/**
* Send a message to the service's event topic to report a removeEndpointLocator event.
@@ -42,7 +42,7 @@ public:
* @param result Informs event listeners of the operations success or failure.
*/
void sendRemoveEndpointLocatorEvent(const ::std::string& locatorId,
- ::Hydra::Core::Routing::V1::Event::OperationResult result);
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const;
/**
* Send a message to the service's event topic to report a aetEndpointLocatorDestinationIds event.
@@ -52,18 +52,18 @@ public:
*/
void sendSetEndpointLocatorDestinationIdsEvent(const ::std::string& locatorId,
const ::Hydra::Core::Routing::V1::RegExSeq& regexList,
- ::Hydra::Core::Routing::V1::Event::OperationResult result);
+ ::Hydra::Core::Routing::V1::Event::OperationResult result) const;
/**
* Send a message to the service's event topic to report the clearEndpointLocators event.
*/
- void sendClearEndpointLocatorsEvent();
+ void sendClearEndpointLocatorsEvent() const;
/**
* Send a message to the service's event topic to report the setPolicy event.
*/
- void sendSetPolicyEvent(const ::std::string& policy);
+ void sendSetPolicyEvent(const ::std::string& policy) const;
private:
boost::shared_ptr<RoutingServiceEventPublisherPriv> mImpl; // pimpl idiom applied.
-----------------------------------------------------------------------
--
hydra/team/ken.hunt/routing.git
More information about the asterisk-scf-commits
mailing list