HydraExpress™ C++ API Reference Guide

Product Documentation:
   HydraExpress C++
Documentation Home
List of all members | Public Member Functions | Protected Member Functions | Related Functions
rwsf::ConnectorImp Class Referenceabstract

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

#include <rwsf/handlers/ConnectorImp.h>

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

Public Member Functions

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

Protected Member Functions

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

Related Functions

(Note that these are not member functions.)


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

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 
protectedpure 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.

configConfiguration properties for initializing this connector.
agentAgentContext that contains the connector. If an invalid handler chain is specified in rwagent.xml for the connector, throws an rwsf::Exception.

Implemented in rwsf::HttpConnectorImp, and rwsf::Ajp13ConnectorImp.

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.

Implemented in rwsf::HttpConnectorImp, and rwsf::Ajp13ConnectorImp.

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.

Implemented in rwsf::HttpConnectorImp, and rwsf::Ajp13ConnectorImp.

Friends And Related Function Documentation


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:

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

<rwsf:connector name="MyConnector"

Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.