HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
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

(Note that these are not member symbols.)

#define 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

◆ ConnectorImp()

rwsf::ConnectorImp::ConnectorImp ( )

Creates a new connector implementation.

Member Function Documentation

◆ getHandlerChain()

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.

◆ getLogger()

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

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

◆ getName()

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.

◆ init()

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.

Parameters
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::Ajp13ConnectorImp, and rwsf::HttpConnectorImp.

◆ start()

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::Ajp13ConnectorImp, and rwsf::HttpConnectorImp.

◆ stop()

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::Ajp13ConnectorImp, and rwsf::HttpConnectorImp.

◆ RWSF_DEFINE_CONNECTOR

#define 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:

#define RWSF_DEFINE_CONNECTOR(NAME)
Definition ConnectorImp.h:153

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 © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.