AgentXcpp  Revision:0.1
Internals Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
agentxcpp::connector::pdu_handler Class Reference

Interface for classes which can handle incoming PDU's. More...

#include <connector.hpp>

Inheritance diagram for agentxcpp::connector::pdu_handler:
[legend]

List of all members.

Public Member Functions

virtual void handle_pdu (boost::shared_ptr< PDU > pdu, int error)=0
 Handler method for incoming PDU's.
virtual ~pdu_handler ()
 Destructor.

Detailed Description

Interface for classes which can handle incoming PDU's.

Classes which want to receive incoming PDU's implement this interface. An object of type pdu_handler can then be registered with a connector object to indicate that it wants to receive PDU's.

Definition at line 143 of file connector.hpp.


Constructor & Destructor Documentation

virtual agentxcpp::connector::pdu_handler::~pdu_handler ( ) [inline, virtual]

Destructor.

Definition at line 173 of file connector.hpp.


Member Function Documentation

virtual void agentxcpp::connector::pdu_handler::handle_pdu ( boost::shared_ptr< PDU pdu,
int  error 
) [pure virtual]

Handler method for incoming PDU's.

When a PDU is received by the connector class, this method is called on the registered object. Note that ResponsePDU's are not handed over to the registered object.

The 'error' parameter is used to report errors. Using exceptions is not possible because of the asynchronous nature of the callback-mechanism.

Parameters:
pduThe PDU which was just received. This is an empty shared_ptr if an error occured.
errorThe error code. 0 means success, -1 means "parse error", -2 means "version error".
Todo:
Check whether usage of boost::system makes sense for error reporting.

Referenced by agentxcpp::connector::receive_callback().


The documentation for this class was generated from the following file: