rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::TransportImp Class Reference
[Transports]

Abstract base class from which all RWSF transports derive. More...

#include <rwsf/webservice/transport/TransportImp.h>

Inheritance diagram for rwsf::TransportImp:
rwsf::MessageHandlerImp rwsf::HttpTransport rwsf::HttpsTransport

List of all members.

Public Member Functions

 TransportImp ()
virtual ~TransportImp ()
virtual bool isConnected () const =0
virtual void doInvoke (rwsf::CallInfo &callInfo)=0
virtual void doSetProperty (const std::string &key, const std::string &value)
virtual void doInit (const rwsf::Config &initParams)
virtual void doConnect ()=0
virtual void doDisconnect ()=0
virtual TransportImpclone () 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)

Protected Attributes

rwsf::Config initParams_

Related Functions

(Note that these are not member functions.)



 RWSF_DEFINE_RWSF_TRANSPORT(NAME)

Detailed Description

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.


Constructor & Destructor Documentation

rwsf::TransportImp::TransportImp (  ) 

Default constructor. Constructs an empty transport.

virtual rwsf::TransportImp::~TransportImp (  )  [virtual]

Destructor.


Member Function Documentation

virtual TransportImp* rwsf::TransportImp::clone (  )  const [pure virtual]

Derived classes should return a new instance of self. (for example, new rwsf::HttpTransport(*this);).

virtual void rwsf::TransportImp::doConnect (  )  [pure virtual]

Derived classes must implement this method to verify that there is a connection. If there is no connection, this method creates one.

virtual void rwsf::TransportImp::doDisconnect (  )  [pure virtual]

Derived classes must implement this method to disconnect a server connection.

virtual void rwsf::TransportImp::doInit ( const rwsf::Config initParams  )  [virtual]

Derived classes can implement this method to be notified when the initialization parameters, initParams, are set for this TransportImp.

Note:
If the transport cannot be initialized, an rwsf::Exception should be thrown. On the client side, exceptions are propagated out to your application code; on the server side, they are logged.
virtual void rwsf::TransportImp::doInvoke ( rwsf::CallInfo callInfo  )  [pure virtual]

Derived classes must implement this method to define the transport handler's behavior.

virtual void rwsf::TransportImp::doSetProperty ( const std::string &  key,
const std::string &  value 
) [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.

virtual bool rwsf::TransportImp::isConnected (  )  const [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 ( 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.

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.


Friends And Related Function Documentation

RWSF_DEFINE_RWSF_TRANSPORT ( NAME   )  [related]

Member Data Documentation

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.