HydraExpress™ C++ 2020 |
HydraExpress™ C++ API Reference Guide |
Product Documentation: HydraExpress C++ Documentation Home |
Abstract base class for implementing Agent connectors. More...
#include <rwsf/handlers/ConnectorImp.h>
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.) | |
#define | RWSF_DEFINE_CONNECTOR(NAME) |
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.
rwsf::ConnectorImp::ConnectorImp | ( | ) |
Creates a new connector implementation.
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.
|
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.
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. |
Implemented in rwsf::HttpConnectorImp, and rwsf::Ajp13ConnectorImp.
|
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.
|
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.
|
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:
the connector definition in the main configuration file (usually <installdir>/conf/rwagent.xml) should read:
Copyright © 2020 Rogue Wave Software, Inc. All Rights Reserved. |