|  HydraExpress™ C++ 2020 | HydraExpress™ C++ API Reference Guide | Product Documentation: HydraExpress C++ Documentation Home | 
Manages handlers for a service, and is used to set a logger in generated clients. More...
#include <rwsf/webservice/HandlerManager.h>
| Static Public Member Functions | |
| static void | addHandler (const std::string &name, const rwsf::MessageHandler &handler) | 
| static void | clearHandlers () | 
| static bool | containsHandler (const std::string &name) | 
| static rwsf::MessageHandler | findHandler (const std::string &name) | 
| static rwsf::Enumeration< std::string > | getHandlerNames () | 
| static void | invokeLogger (rwsf::CallInfo &callInfo) | 
| static void | invokeLogger (const std::string &message, rwsf::CallInfo::LogLevel logLevel=rwsf::CallInfo::Info) | 
| static void | loadConfiguration (const std::string &fileName) | 
| static void | setLogger (const rwsf::MessageHandler &handler) | 
rwsf::HandlerManager loads, stores, and locates handlers for a service. In generated clients, it is used to set a logger. In addition, clients accessing a service through a notification-type method – which requires setting up a listener on the client – also use this class to initialize the client-handlers.xml configuration file.
For a discussion on handlers and how to use or create them, see the Web Service Development Guide.
When deploying services, the static method loadConfiguration() is called automatically.
To initialize handlers in a client executable, however, you must call loadConfiguration("client-handlers.xml") directly. To use a custom handler configuration file, specify the custom file name instead of "client-handlers.xml". 
| 
 | static | 
Adds a handler to a service. Although you may use this function directly, it is more typically called by loadConfiguration().
| 
 | static | 
Removes all handlers added directly with addHandler() or indirectly with loadConfiguration().
| 
 | static | 
Returns true if a handler with the given name is found, otherwise false. 
| 
 | static | 
Returns the handler identified by name. Throws an rwsf::Exception if the handler cannot be found.
| 
 | static | 
Returns an enumeration of all registered handlers.
| 
 | static | 
Initializes the logger. Throws an exception of type rwsf::ExternalException if the logger cannot be found. For more information on logging, see the Logging chapter in the Web Services Development Guide.
| 
 | static | 
Logs the given message to the default logger. By default, the message will have a log level of "Info". Use the optional second parameter to change the log level. Example:
For more information on logging, see the Logging chapter in the Web Services Development Guide.
| 
 | static | 
Reads and parses an xml configuration file fileName. Used to load handlers specified in a configuration file indicated by filename.
| 
 | static | 
Adds a logger handler. For more information on logging, see the Logging chapter in the Web Services Development Guide.
| Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. |