HydraExpress 4.7 |
HydraExpress C++ API Reference Guide |
Product Documentation:
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) |
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) |
Additional Inherited Members | |
Protected Member Functions inherited from rwsf::BodyBase | |
BodyBase (void) | |
BodyBase (const BodyBase &second) | |
virtual | ~BodyBase (void) |
BodyBase & | operator= (const BodyBase &second) |
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);)
.
|
pure virtual |
Derived classes must implement this method to verify that there is a connection. If there is no connection, this method creates one.
|
pure virtual |
Derived classes must implement this method to disconnect a server connection.
|
virtual |
Derived classes can implement this method to be notified when the initialization parameters, initParams, are set for this TransportImp.
|
pure virtual |
Derived classes must implement this method to define the transport handler's behavior.
|
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.
|
pure virtual |
Derived classes must implement this method to indicate whether the transport is connected or not. Returns true
if connected, false
otherwise.
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 © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.