* Listens on changes in NetconfState/Sessions/Session datastore and publishes them.
*/
public class SessionNotificationProducer extends OperationalDatastoreListener<Session> {
-
private static final InstanceIdentifier<Session> SESSION_INSTANCE_IDENTIFIER =
InstanceIdentifier.create(NetconfState.class).child(Sessions.class).child(Session.class);
private static final Logger LOG = LoggerFactory.getLogger(SessionNotificationProducer.class);
-
private final BaseNotificationPublisherRegistration baseNotificationPublisherRegistration;
private final ListenerRegistration<?> sessionListenerRegistration;
this.sessionListenerRegistration = registerOnChanges(dataBroker);
}
- @SuppressWarnings("checkstyle:MissingSwitchDefault")
@Override
public void onDataTreeChanged(final Collection<DataTreeModification<Session>> changes) {
for (DataTreeModification<Session> change : changes) {
baseNotificationPublisherRegistration.onSessionEnded(sessionEnd);
}
-
/**
* Invoked by blueprint.
*/