INanoServiceMonitor

A nano service monitor oversees the registration and de-registration of certain nano services. It is a component of the nano service registry.

Getting a nano service monitor

The monitor can be obtained via the nano service registry.

final INanoServiceMonitor monitor = nanoServiceRegistry.getNanoServiceMonitor();

Adding observers

An observer can be added by specifying the nano service ID to be monitored.

void addFilter(@NotNull CTargetAddress aObserver,
               @NotNull IId aSID);

Filter removal

Monitoring of a particular nano service can also be terminated.

void removeFilter(@NotNull CTargetAddress aObserver,
                  @NotNull IId aSID);

Removal of all filters of an observer

An observer terminates monitoring as follows:

void removeAddress(@NotNull CTargetAddress aObserver);

Events

If a nano service is registered, the monitor observers get the message CRecordNanoServiceNotifyServiceRegistered.

If a nano service is de-registered, the monitor observers get the message CRecordNanoServiceNotifyServiceDeregistered.

If a nano service observer is registered, the monitor observers get the message CRecordNanoServiceNotifyServiceRegistered.

If a nano service observer is de-registered, the monitor observers get the message CRecordNanoServiceNotifyServiceDeregistered.