B2BITS FIX Antenna C++ 2.32.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Bats::ApplicationListener Class Reference

@Application observer More...

#include <B2BITS_BatsApplication.h>

Public Member Functions

virtual void onNotification (UnitService *service, ServiceListener::Notification::Type type)
 Forwarded ServiceListener::onNotification events.
 
virtual void onServiceAdded (UnitService *service)
 Called after a service is created and added to the application.
 
virtual void onServiceRemoved (const std::string &channelId, System::u8 unitId)
 Called after a service is removed from the application and destroyed.
 
virtual void onServiceRemoving (UnitService *service)
 Called right before a service is removed from the application and destroyed.
 
virtual void onStartThread (ThreadType::Type type, const std::string &channelId, System::u8 unitId, unsigned index, unsigned count)
 Called from each thread on start.
 
virtual void onStopThread (ThreadType::Type type, const std::string &channelId, System::u8 unitId, unsigned index, unsigned count)
 Called from each thread at exit.
 

Detailed Description

@Application observer

Provides interface to receive application level events. Unit level notifications are also available via ApplicationListener::onNotification callback. Notifications are forwarded from each service application creates

Member Function Documentation

◆ onNotification()

virtual void Bats::ApplicationListener::onNotification ( UnitService * service,
ServiceListener::Notification::Type type )
inlinevirtual

Forwarded ServiceListener::onNotification events.

Parameters
serviceService that generated notification
typeNotification type

◆ onServiceAdded()

virtual void Bats::ApplicationListener::onServiceAdded ( UnitService * service)
inlinevirtual

Called after a service is created and added to the application.

Parameters
serviceService that has just been created

◆ onServiceRemoved()

virtual void Bats::ApplicationListener::onServiceRemoved ( const std::string & channelId,
System::u8 unitId )
inlinevirtual

Called after a service is removed from the application and destroyed.

Parameters
channelIdId of the channel, specified as channel@id attribute in XML configuration file
unitIdId of the unit specified as unit@id attribute in XML configuration file

◆ onServiceRemoving()

virtual void Bats::ApplicationListener::onServiceRemoving ( UnitService * service)
inlinevirtual

Called right before a service is removed from the application and destroyed.

Parameters
serviceService to be destroyed

◆ onStartThread()

virtual void Bats::ApplicationListener::onStartThread ( ThreadType::Type type,
const std::string & channelId,
System::u8 unitId,
unsigned index,
unsigned count )
inlinevirtual

Called from each thread on start.

Parameters
typeType of the thread
channelIdId of the channel, specified as channel@id attribute in XML configuration file
unitIdId of the unit specified as unit@id attribute in XML configuration file
indexZero-based index of the thread within its pool
countTotal number of threads in the pool

◆ onStopThread()

virtual void Bats::ApplicationListener::onStopThread ( ThreadType::Type type,
const std::string & channelId,
System::u8 unitId,
unsigned index,
unsigned count )
inlinevirtual

Called from each thread at exit.

Parameters
typeType of the thread
channelIdId of the channel, specified as channel@id attribute in XML configuration file
unitIdId of the unit specified as unit@id attribute in XML configuration file
indexZero-based index of the thread within its pool
countTotal number of threads in the pool