HydraExpress™ C++ 2020 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Abstract base class from which all RWSF transports derive. More...
#include <rwsf/webservice/transport/TransportImp.h>
Public Member Functions | |
TransportImp () | |
virtual | ~TransportImp () |
virtual TransportImp * | clone () const =0 |
virtual void | doConnect ()=0 |
virtual void | doDisconnect ()=0 |
virtual void | doInit (const rwsf::Config &initParams) |
virtual void | doInvoke (rwsf::CallInfo &callInfo)=0 |
virtual void | doSetProperty (const std::string &key, const std::string &value) |
void | invoke (rwsf::CallInfo &callInfo) |
virtual bool | isConnected () const =0 |
void | log (const std::string &message, rwsf::CallInfo::LogLevel l=rwsf::CallInfo::Info) |
void | log (rwsf::CallInfo &callInfo, rwsf::CallInfo::LogLevel loglevel=rwsf::CallInfo::Info) |
Public Member Functions inherited from rwsf::MessageHandlerImp | |
MessageHandlerImp () | |
virtual | ~MessageHandlerImp () |
virtual void | destroy () |
virtual void | init (const rwsf::Config &initParams) |
Protected Attributes | |
rwsf::Config | initParams_ |
Related Functions | |
(Note that these are not member functions.) | |
#define | RWSF_DEFINE_RWSF_TRANSPORT(NAME) |
Related Functions inherited from rwsf::MessageHandlerImp | |
#define | RWSF_DEFINE_MESSAGE_HANDLER(NAME) |
#define | RWSF_DEFINE_STATIC_MESSAGE_HANDLER(ID, NAME) |
rwsf::TransportImp is an abstract base class and is the body implementation for the handle represented by rwsf::Transport. All RWSF transports derive from this class, and you can also create your own customized transport by deriving from this class.
For an example on creating a custom transport, see the Transports chapter in the Web Service Development Guide.
Multithread Safety
To support multithread safety, rwsf::TransportImp provides the invoke implementation for all transports. The method invoke() creates a multithread guard and then calls doInvoke(), which is implemented in the derived classes. This design provides thread safety for all derived classes during asynchronous processing, and allows your application to share transports safely.
If you are not using asynchronous processing and want to avoid using the mutex guard, you may want to reimplement invoke() in your derived classes.
rwsf::TransportImp::TransportImp | ( | ) |
Default constructor. Constructs an empty transport.
|
virtual |
Destructor.
|
pure virtual |
Derived classes should return a new instance of self. (for example, new rwsf::HttpTransport(*this);)
.
Implemented in rwsf::HttpsTransport, and rwsf::HttpTransport.
|
pure virtual |
Derived classes must implement this method to verify that there is a connection. If there is no connection, this method creates one.
Implemented in rwsf::HttpTransport, and rwsf::HttpsTransport.
|
pure virtual |
Derived classes must implement this method to disconnect a server connection.
Implemented in rwsf::HttpTransport.
|
virtual |
Derived classes can implement this method to be notified when the initialization parameters, initParams, are set for this TransportImp.
Reimplemented in rwsf::HttpTransport.
|
pure virtual |
Derived classes must implement this method to define the transport handler's behavior.
Implemented in rwsf::HttpTransport.
|
virtual |
Derived classes can implement this method to be notified when properties are set on this TransportImp object. The key and value are the most recent property values set.
Reimplemented in rwsf::HttpTransport.
|
virtual |
This method implements the main functionality of a service and is called by any service or client invoking the service.
Reimplemented from rwsf::MessageHandlerImp.
|
pure virtual |
Derived classes must implement this method to indicate whether the transport is connected or not. Returns true
if connected, false
otherwise.
Implemented in rwsf::HttpsTransport, and rwsf::HttpTransport.
void rwsf::TransportImp::log | ( | const std::string & | message, |
rwsf::CallInfo::LogLevel | l = rwsf::CallInfo::Info |
||
) |
Invokes the logger with the error message in message and log level in l. See rwsf::Logger for a description of log levels.
void rwsf::TransportImp::log | ( | rwsf::CallInfo & | callInfo, |
rwsf::CallInfo::LogLevel | loglevel = rwsf::CallInfo::Info |
||
) |
Invokes the logger with the error message in callInfo and log level in loglevel. See rwsf::Logger for a description of log levels.
|
related |
|
protected |
Holds the initialization properties.
Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. |