ANNA Suite  2020b
Multipurpose development suite for Telco applications
Public Member Functions | List of all members
test::Communicator Class Reference

#include <Communicator.hpp>

Inheritance diagram for test::Communicator:
Inheritance graph
[legend]
Collaboration diagram for test::Communicator:
Collaboration graph
[legend]

Public Member Functions

 Communicator ()
 
void setDelay (const Millisecond delay)
 
void setMaxMessage (const int maxMessage)
 
int getMaxMessage () const
 
int getMessage () const
 
bool canContinue (const comm::ClientSocket &) noexcept(false)
 
void delay () noexcept(false)
 
void terminate ()
 
- Public Member Functions inherited from anna::comm::Communicator
 Communicator (const WorkMode::_v acceptMode=WorkMode::Single)
 
virtual ~Communicator ()
 
const MillisecondgetRecoveryTime () const
 
const StatusgetStatus () const
 
const MillisecondgetTimeout () const
 
WorkMode::_v getWorkMode () const
 
bool isServing () const
 
bool hasRequestedStop () const
 
void notifyPendingClose ()
 
void setRecoveryTime (const Millisecond &recoveryTime) noexcept(false)
 
void setTryingConnectionTime (const Millisecond &tryingConnectionTime) noexcept(false)
 
const MillisecondgetTryingConnectionTime () const
 
void setTimeout (const Millisecond &timeout)
 
void setLevelOfDenialService (const int levelOfDenialService) noexcept(false)
 
int getLevelOfDenialService () const
 
void attach (ServerSocket *serverSocket) noexcept(false)
 
void attach (LocalConnection *localConnection) noexcept(false)
 
void attach (ClientSocket *clientSocket) noexcept(false)
 
void attach (DatagramSocket *datagramSocket) noexcept(false)
 
void attach (Handler *handler) noexcept(false)
 
void attach (Service *service) noexcept(false)
 
void detach (ServerSocket *serverSocket)
 
void detach (ClientSocket *clientSocket)
 
void detach (Handler *handler)
 
const HandlergetHandler (const ClientSocket &clientSocket) noexcept(false)
 
void accept () noexcept(false)
 
void requestStop ()
 
bool isUsable (const ClientSocket *clientSocket)
 
int handler_size () const
 
handler_iterator handler_begin ()
 
handler_iterator handler_end ()
 
const_handler_iterator handler_begin () const
 
const_handler_iterator handler_end () const
 
const_service_iterator service_begin () const
 
const_service_iterator service_end () const
 
virtual void eventUser (const char *id, const void *context)
 
virtual void eventBreakAddress (const in_addr_t &address)
 
virtual void eventRecoverAddress (const in_addr_t &address)
 
virtual bool eventAcceptConnection (const ClientSocket &clientSocket) noexcept(false)
 
virtual void eventCreateConnection (const Server *server)
 
virtual void eventCreateConnection (const Service *service)
 
virtual void eventReceiveMessage (ClientSocket &clientSocket, const Message &message) noexcept(false)
 
virtual void eventDiscardConnection (const ClientSocket &clientSocket)
 
virtual void eventIgnoreBurst (const ClientSocket &clientSocket, const DataBlock &burst)
 
std::string asString () const
 
virtual xml::NodeasXML (xml::Node *parent) const
 
- Public Member Functions inherited from anna::app::Component
virtual ~Component ()
 
void attach () noexcept(false)
 
- Public Member Functions inherited from anna::Component
const char * getClassName () const
 
- Public Member Functions inherited from anna::Mutex
 Mutex (const Mode::_v mode=Mode::Recursive)
 
virtual ~Mutex ()
 
virtual void lock () noexcept(false)
 
virtual void unlock ()
 
bool trylock () noexcept(false)
 
 operator const pthread_mutex_t * () const
 

Additional Inherited Members

- Public Types inherited from anna::comm::Communicator
typedef SortedVector< Handler, SortByFileDescriptor > Handlers
 
typedef Handlers::const_iterator const_handler_iterator
 
typedef Handlers::iterator handler_iterator
 
typedef std::vector< const Service * > Services
 
typedef Services::const_iterator const_service_iterator
 
- Static Public Member Functions inherited from anna::comm::Communicator
static void setReceivingChunkSize (const int receivingChunkSize) noexcept(false)
 
static int getReceivingChunkSize ()
 
static Handlerhandler (handler_iterator &ii)
 
static const Handlerhandler (const_handler_iterator &ii)
 
static const Serviceservice (const_service_iterator &ii)
 
static const char * getClassName ()
 
- Static Public Attributes inherited from anna::comm::Communicator
static const Millisecond MinRecoveryTime
 
static const Millisecond DefaultRecoveryTime
 
static const Millisecond MaxRecoveryTime
 
static const Millisecond MinTryingConnectionTime
 
static const Millisecond DefaultTryingConnectionTime
 
static const Millisecond MaxTryingConnectionTime
 
static const int MinReceivingChunkSize = 2 * 1024
 
static const int MaxReceivingChunkSize = 64 * 1024
 
static const Millisecond DefaultTimeout
 
static const int DefaultChunkSize = 16 * 1024
 
- Protected Member Functions inherited from anna::comm::Communicator
virtual void eventBreakConnection (const ClientSocket &clientSocket)
 
virtual void eventBreakLocalConnection (const ClientSocket &clientSocket)
 
virtual void eventBreakConnection (const Server *server)
 
virtual void eventBreakConnection (const Service *service)
 
virtual void do_initialize () noexcept(false)
 
void do_stop ()
 
virtual void setStatus (const Status &status)
 
void attach (BinderSocket *binderSocket) noexcept(false)
 
void detach (BinderSocket *binderSocket)
 
virtual void eventStartup () noexcept(false)
 
virtual void eventShutdown ()
 
- Protected Member Functions inherited from anna::app::Component
 Component (const char *className)
 
State::_v getState () const
 
void addPredecessor (const char *componentName)
 
void initialize () noexcept(false)
 
void stop ()
 
virtual void kill ()
 
- Protected Member Functions inherited from anna::Component
 Component (const char *className)
 
 Component (const Component &other)
 
- Protected Member Functions inherited from anna::Safe
 Safe ()
 
- Protected Attributes inherited from anna::Component
const std::string a_className
 

Constructor & Destructor Documentation

◆ Communicator()

test::Communicator::Communicator ( )
inline
20  : comm::Communicator (),
21  a_maxMessage (-1),
22  a_messageCounter (0),
23  a_successCounter (0),
24  a_initTime (0),
25  a_avgDelay ("AvgDelay"),
26  a_delay (0)
27  {;}
Definition: Communicator.hpp:79

Member Function Documentation

◆ canContinue()

bool test::Communicator::canContinue ( const comm::ClientSocket )
noexcept

◆ delay()

void test::Communicator::delay ( )
noexcept

◆ getMaxMessage()

int test::Communicator::getMaxMessage ( ) const
inline
32 { return a_maxMessage; }

◆ getMessage()

int test::Communicator::getMessage ( ) const
inline
33 { return a_messageCounter; }

◆ setDelay()

void test::Communicator::setDelay ( const Millisecond  delay)
inline
29 { a_delay = delay; }
void delay() noexcept(false)

◆ setMaxMessage()

void test::Communicator::setMaxMessage ( const int  maxMessage)
inline
30 { a_maxMessage = maxMessage; }

◆ terminate()

void test::Communicator::terminate ( )

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