Last active
January 3, 2016 05:49
-
-
Save aozturk/8418146 to your computer and use it in GitHub Desktop.
Revisions
-
aozturk revised this gist
Jul 16, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ namespace AMS { class IService { public: // Create or just return a singleton instance static IService& instance(); // Destroy the singleton instance @@ -44,6 +44,5 @@ namespace AMS { // Run service in debug mode void debug_mode() { m_consoleLogger->setLevel("debug"); } }; } //namespace AMS -
aozturk revised this gist
Jul 16, 2014 . 1 changed file with 0 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,3 @@ namespace AMS { class IService { public: -
aozturk revised this gist
Jul 16, 2014 . 1 changed file with 46 additions and 31 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,43 +1,58 @@ #pragma once #include "AMS/Net/Context.h" #include "AMS/PubSub/PubSub.h" #include "AMS/Reactor/Poller.h" #include "AMS/Reactor/IHandler.h" #include "AMS/Reactor/Dispatcher.h" #include "AMS/Discovery/Aliveness.h" namespace AMS { class IService { public: // Create or just return a singleton instance static IService& instance(); // Destroy the singleton instance static void destroy(); // Create a messaging domain restricted for communication void create_domain(std::string domainName, std::string selfDesc); // Create a subscriber for T-typed messages template<typename T> void create_subscriber(); // Create a publisher for T-typed messages template<typename T> void create_publisher(); // Subscribe a handler to T-typed messages dispatched automatically template<typename T> void subscribe(IHandler& handler); // Unsubscribe from receiving T-typed messages template<typename T> void unsubscribe(); // Send a message to all subscribers void send_message(IMsgObj& obj); // Start/stop the reactor for the communication void reactor_start(); void reactor_stop(); // Register a notifier for peer status updates within the domain void register_discovery(IPeerNotification* notifier); // Return the host ip address std::string get_host_ip() const; // Return the service logger Poco::Logger& logger() { return *m_consoleLogger; } // Run service in debug mode void debug_mode() { m_consoleLogger->setLevel("debug"); } }; } //namespace AMS -
aozturk renamed this gist
Jul 16, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aozturk revised this gist
Apr 20, 2014 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ // creates or just returns a singleton AMS service instance static IService& IService::instance(); @@ -41,4 +40,4 @@ static void IService::destroy(); Poco::Logger& IService::logger(); // runs the service in debug mode for exhaustive logging void IService::debug_mode(); -
aozturk revised this gist
Apr 20, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ // creates or just returns a singleton AMS service instance static IService& IService::instance(); @@ -40,4 +41,4 @@ static void IService::destroy(); Poco::Logger& IService::logger(); // runs the service in debug mode for exhaustive logging void IService::debug_mode(); -
aozturk revised this gist
Jan 14, 2014 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ // creates or just returns a singleton AMS service instance static IService& IService::instance(); // creates (or joins to) a messaging domain that is restricted for communication @@ -26,18 +26,18 @@ void IService::create_publisher(); // sends a message to all subscribers void IService::send_message(IMsgObj& obj); // registers a notifier for peer status updates within the domain void IService::register_discovery(IPeerNotification* notifier); // returns the own host ip address std::string IService::get_host_ip() const; // destroys the service singleton instance static void IService::destroy(); // returns the service global logger Poco::Logger& IService::logger(); // runs the service in debug mode for exhaustive logging void IService::debug_mode(); -
aozturk revised this gist
Jan 14, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ /// creates or just returns a singleton AMS service instance static IService& IService::instance(); // creates (or joins to) a messaging domain that is restricted for communication -
aozturk revised this gist
Jan 14, 2014 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,4 @@ /* creates or just returns a singleton AMS service instance */ static IService& IService::instance(); // creates (or joins to) a messaging domain that is restricted for communication -
aozturk created this gist
Jan 14, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ /** * creates or just returns a singleton AMS service instance */ static IService& IService::instance(); // creates (or joins to) a messaging domain that is restricted for communication void IService::create_domain(std::string domainName, std::string appName); // starts/stops the reactor for both the communication and the dynamic discovery void IService::reactor_start(); void IService::reactor_stop(); // creates a subscriber for T-typed messages template<typename T> void IService::create_subscriber(); // subscribes a handler object for T-typed messages received template<typename T> void IService::subscribe(IHandler& handler); // unsubscribes from receiving T-typed messages template<typename T> void IService::unsubscribe(); // creates a publisher for T-typed messages template<typename T> void IService::create_publisher(); // sends a message to all subscribers void IService::send_message(IMsgObj& obj); Registers a notifier for peer status updates within the domain void IService::register_discovery(IPeerNotification* notifier); Returns the own host ip address std::string IService::get_host_ip() const; Destroys the service singleton instance static void IService::destroy(); Returns the service global logger Poco::Logger& IService::logger(); Runs the service in debug mode for exhaustive logging void IService::debug_mode();