observer
More...
#include <B2BITS_BatsApplication.h>
|
virtual void | onNotification (UnitService *service, ServiceListener::Notification::Type type) |
| Forwarded ServiceListener::onNotification events. More...
|
|
virtual void | onServiceAdded (UnitService *service) |
| Called after a service is created and added to the application. More...
|
|
virtual void | onServiceRemoved (const std::string &channelId, System::u8 unitId) |
| Called after a service is removed from the application and destroyed. More...
|
|
virtual void | onServiceRemoving (UnitService *service) |
| Called right before a service is removed from the application and destroyed. More...
|
|
virtual void | onStartThread (ThreadType::Type type, const std::string &channelId, System::u8 unitId, unsigned index, unsigned count) |
| Called from each thread on start. More...
|
|
virtual void | onStopThread (ThreadType::Type type, const std::string &channelId, System::u8 unitId, unsigned index, unsigned count) |
| Called from each thread at exit. More...
|
|
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
◆ onNotification()
◆ onServiceAdded()
virtual void Bats::ApplicationListener::onServiceAdded |
( |
UnitService * |
service | ) |
|
|
inlinevirtual |
Called after a service is created and added to the application.
- Parameters
-
service | Service 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
-
channelId | Id of the channel, specified as channel@id attribute in XML configuration file |
unitId | Id 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
-
service | Service 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
-
type | Type of the thread |
channelId | Id of the channel, specified as channel@id attribute in XML configuration file |
unitId | Id of the unit specified as unit@id attribute in XML configuration file |
index | Zero-based index of the thread within its pool |
count | Total 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
-
type | Type of the thread |
channelId | Id of the channel, specified as channel@id attribute in XML configuration file |
unitId | Id of the unit specified as unit@id attribute in XML configuration file |
index | Zero-based index of the thread within its pool |
count | Total number of threads in the pool |