rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::ConnectorImp Class Reference
[Message Handling]

Abstract base class for implementing Agent connectors. More...

#include <rwsf/handlers/ConnectorImp.h>

Inheritance diagram for rwsf::ConnectorImp:
rwsf::Ajp13ConnectorImp rwsf::HttpConnectorImp rwsf::HttpsConnectorImp

List of all members.

Public Member Functions

 ConnectorImp ()
virtual void start ()=0
virtual void stop ()=0
std::string getName () const
rwsf::MessageInfoHandlerChain getHandlerChain () const
rwsf::Logger getLogger ()

Protected Member Functions

virtual void init (const rwsf::Config &config, const rwsf::AgentContext &agent)=0

Related Functions

(Note that these are not member functions.)



 RWSF_DEFINE_CONNECTOR(NAME)

Detailed Description

ConnectorImp serves as an abstract base class for implementing Agent connectors, which create MessageInfo objects and pass them through a handler chain. This class is used by the Agent internally, and you can also use it to create custom connectors. See the chapter on connectors in the User Guide.

This class defines the body interface for the bridge pattern.

See also:
rwsf::Connector

Constructor & Destructor Documentation

rwsf::ConnectorImp::ConnectorImp (  ) 

Creates a new connector implementation.


Member Function Documentation

rwsf::MessageInfoHandlerChain rwsf::ConnectorImp::getHandlerChain (  )  const

Returns the handler chain for this connector. The handler chain is required and can be set only during initialization.

rwsf::Logger rwsf::ConnectorImp::getLogger (  ) 

Returns the logger for this connector. Applications should use rwsf::Logger::isValid() on the returned logger to determine validity.

std::string rwsf::ConnectorImp::getName (  )  const

Returns the name of this connector, or an empty string if none provided. The name of the connector is optional and can be set only during initialization.

virtual void rwsf::ConnectorImp::init ( const rwsf::Config config,
const rwsf::AgentContext agent 
) [protected, pure virtual]

Initializes this connector's implementation. If this function is overridden in derived classes, the overriding function must call this function first before doing anything else.

Parameters:
config Configuration properties for initializing this connector.
agent AgentContext that contains the connector. If an invalid handler chain is specified in rwagent.xml for the connector, throws an rwsf::Exception.
virtual void rwsf::ConnectorImp::start (  )  [pure virtual]

Starts this connector. Derived classes must implement this function. The implementation should not block process execution, that is, it should return control immediately to the caller.

virtual void rwsf::ConnectorImp::stop (  )  [pure virtual]

Stops this connector. Derived classes must implement this function. The implementation can block process execution if neccessary, until shutdown is completed.


Friends And Related Function Documentation

RWSF_DEFINE_CONNECTOR ( NAME   )  [related]

Defines a function that returns an instance of NAME. The macro names the function by prefacing NAME with the word "create". The Agent uses the function to construct an instance of the connector implementation. For example, to use a connector for the macro:

 RWSF_DEFINE_CONNECTOR(MyConnector)

the connector definition in the main configuration file (usually <installdir>/conf/rwagent.xml) should read:

   <rwsf:connector name="MyConnector" 
                   class="myConnectorLibrary.createMyConnector"
                   handlerChain="myChain">

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.