AFI
Advanced Forwarding Interface
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | Protected Attributes | List of all members
AftTransport Class Referenceabstract

Largely virtual base class used for all Aft transport implementations. More...

#include <AftTransport.h>

Public Member Functions

virtual bool open (const std::string &name, AftSandboxPtr &sandbox)=0
 Open a connection(s) More...
 
virtual void close ()=0
 Close a connection to the server(s)
 
virtual bool alloc (const std::string &engineName, const std::string &name, const uint32_t inputPorts, const uint32_t outputPorts)=0
 Release the memory and all the nodes associated with a sandbox. More...
 
virtual bool release (const std::string &name)=0
 Release the memory and all the nodes associated with a sandbox. More...
 
virtual void send (const AftInsertPtr &newInsert)=0
 Send an AftInsert to the sandbox on the server. More...
 
virtual void send (const AftRemovePtr &newRemove)=0
 Send an AftRemove to the sandbox on the server. More...
 
void setReceiver (const AftReceiverPtr &newReceiver)
 Set the event receiver for the transport. More...
 
AftReceiverPtr receiver () const
 
void setTracing (const bool tracingEnabled)
 Enable or disable transport tracing. More...
 
bool tracing () const
 

Protected Attributes

AftReceiverPtr _receiver
 Pointer to receiver used to handle events.
 
bool _tracing
 True if transport debug tracing is enabled.
 

Detailed Description

Largely virtual base class used for all Aft transport implementations.

Member Function Documentation

virtual bool AftTransport::alloc ( const std::string &  engineName,
const std::string &  name,
const uint32_t  inputPorts,
const uint32_t  outputPorts 
)
pure virtual

Release the memory and all the nodes associated with a sandbox.

Parameters
[in]engineNameName of the engine that we create the sandbox with
[in]nameName of the sandbox the transport should create
[in]inputPortsNumber of input ports to allocate for sandbox
[in]outputPortsNumber of output ports to allocate for sandbox
Return values
trueAlloc was successful
falseAlloc failed
virtual bool AftTransport::open ( const std::string &  name,
AftSandboxPtr sandbox 
)
pure virtual

Open a connection(s)

Parameters
[in]nameName of the sandbox the transport controls
[in]sandboxReference to the receiver instance used to handle incoming events
Return values
trueOpen was successful
falseOpen failed
AftReceiverPtr AftTransport::receiver ( ) const
inline
Returns
Returns pointer to the event receiver
virtual bool AftTransport::release ( const std::string &  name)
pure virtual

Release the memory and all the nodes associated with a sandbox.

Parameters
[in]nameName of the sandbox the transport controls
virtual void AftTransport::send ( const AftInsertPtr newInsert)
pure virtual

Send an AftInsert to the sandbox on the server.

Parameters
[in]newInsertReference to the AftInsert to send
virtual void AftTransport::send ( const AftRemovePtr newRemove)
pure virtual

Send an AftRemove to the sandbox on the server.

Parameters
[in]newRemoveReference to the AftRemove to send
void AftTransport::setReceiver ( const AftReceiverPtr newReceiver)
inline

Set the event receiver for the transport.

Parameters
[in]receiverReference to the receiver to use for events
void AftTransport::setTracing ( const bool  tracingEnabled)
inline

Enable or disable transport tracing.

Parameters
[in]tracingEnabledTrue if transport tracing should be enabled
bool AftTransport::tracing ( ) const
inline
Returns
True if transport tracing is enabled

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