HydraExpress™ C++ 2019 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Abstract base class for all listener implementations. More...
#include <rwsf/webservice/listener/MessageListenerImp.h>
Public Member Functions | |
MessageListenerImp () | |
virtual | ~MessageListenerImp () |
virtual std::string | getProperty (const std::string &key) |
virtual void | init (const rwsf::Config &initParams) |
virtual void | invoke (rwsf::CallInfo &callInfo) |
bool | isStopped () |
void | log (const std::string &message, rwsf::CallInfo::LogLevel l=rwsf::CallInfo::Error) |
void | log (rwsf::CallInfo &callInfo, rwsf::CallInfo::LogLevel l=rwsf::CallInfo::Error) |
virtual void | setProperty (const std::string &key, const std::string &value) |
Public Member Functions inherited from rwsf::MessageHandlerImp | |
MessageHandlerImp () | |
virtual | ~MessageHandlerImp () |
virtual void | destroy () |
Protected Member Functions | |
virtual void | doInit (const rwsf::Config &initParams)=0 |
virtual void | doReset ()=0 |
virtual void | doStart ()=0 |
virtual void | doStop ()=0 |
virtual void | initServer ()=0 |
Additional Inherited Members | |
Related Functions inherited from rwsf::MessageHandlerImp | |
#define | RWSF_DEFINE_MESSAGE_HANDLER(NAME) |
#define | RWSF_DEFINE_STATIC_MESSAGE_HANDLER(ID, NAME) |
rwsf::MessageListenerImp is the abstract base class from which all listener body classes derive. Since listeners are handlers in RWSF, rwsf::MessageListenerImp derives from rwsf::MessageHandlerImp.
rwsf::MessageListenerImp implements the handle/body pattern in which rwsf::MessageListener is the handle, and rwsf::MessageListenerImp is the body.
For properties that can be set on a listener, and other details, see the handle class rwsf::MessageListener.
To create a new listener:
initServer()
, doStart()
, and doStop()
.RWSF_DEFINE_MESSAGE_HANDLER(NAME)
.client-transports.xml
, or use this class to set properties.For more information on creating and using listeners, see the Web Service Development Guide.
rwsf::MessageListenerImp::MessageListenerImp | ( | ) |
Default constructor.
|
virtual |
Virtual destructor.
|
protectedpure virtual |
Pure virtual function. In derived classes, init()
calls this method to handle any initialization specific to the implementation.
Implemented in rwsf::HttpMessageListener, and rwsf::HttpsMessageListener.
|
protectedpure virtual |
Pure virtual function. In the derived classes, this method is called by reset()
to handle resetting the listener.
Implemented in rwsf::HttpMessageListener.
|
protectedpure virtual |
Pure virtual function. In derived classes, this method is the entry point for the listening thread, which is spawned in start()
after calling initServer()
.
Implemented in rwsf::HttpMessageListener.
|
protectedpure virtual |
Pure virtual function. In the derived classes, this method is called by stop()
to handle any listener thread shutdown specific to the implementation.
Implemented in rwsf::HttpMessageListener.
|
virtual |
Given a property key, returns its value.
|
virtual |
Initializes this handler. The values of the parameter initParams come from the handlers.xml
file that defines the handler chains for this service.
Reimplemented from rwsf::MessageHandlerImp.
|
protectedpure virtual |
Pure virtual function. In derived classes, start()
calls this method, which is expected to handle any setup needed by the listening thread specific to the implementation.
Implemented in rwsf::HttpMessageListener, and rwsf::HttpsMessageListener.
|
virtual |
Handles an incoming message, forwarding it to the service implementation. The callInfo object holds metadata extracted from the message header.
Reimplemented from rwsf::MessageHandlerImp.
bool rwsf::MessageListenerImp::isStopped | ( | ) |
Returns true
if this listener is stopped, else false
.
void rwsf::MessageListenerImp::log | ( | const std::string & | message, |
rwsf::CallInfo::LogLevel | l = rwsf::CallInfo::Error |
||
) |
Invokes the logger and adds a message to it, forwarding to the service implementation. Sets the log level to Error
.
void rwsf::MessageListenerImp::log | ( | rwsf::CallInfo & | callInfo, |
rwsf::CallInfo::LogLevel | l = rwsf::CallInfo::Error |
||
) |
Invokes the logger and forwards to the service implementation. Sets the log level to Error
.
|
virtual |
Sets a key/value property on the listener.
Copyright © 2019 Rogue Wave Software, Inc. All Rights Reserved. |