Search in sources :

Example 1 with CapabilityListener

use of org.opendaylight.netconf.api.monitoring.CapabilityListener in project netconf by opendaylight.

the class AggregatedNetconfOperationServiceFactory method onAddNetconfOperationServiceFactory.

@Override
public synchronized void onAddNetconfOperationServiceFactory(NetconfOperationServiceFactory service) {
    factories.add(service);
    for (final CapabilityListener listener : listeners) {
        AutoCloseable reg = service.registerCapabilityListener(listener);
        registrations.put(service, reg);
    }
}
Also used : CapabilityListener(org.opendaylight.netconf.api.monitoring.CapabilityListener)

Example 2 with CapabilityListener

use of org.opendaylight.netconf.api.monitoring.CapabilityListener in project netconf by opendaylight.

the class CurrentSchemaContext method onModelContextUpdated.

@Override
public void onModelContextUpdated(final EffectiveModelContext schemaContext) {
    currentContext.set(schemaContext);
    // FIXME is notifying all the listeners from this callback wise ?
    final Set<Capability> addedCaps = MdsalNetconfOperationServiceFactory.transformCapabilities(currentContext.get(), rootSchemaSourceProvider);
    for (final CapabilityListener listener : listeners1) {
        listener.onCapabilitiesChanged(addedCaps, Collections.emptySet());
    }
}
Also used : Capability(org.opendaylight.netconf.api.capability.Capability) CapabilityListener(org.opendaylight.netconf.api.monitoring.CapabilityListener)

Aggregations

CapabilityListener (org.opendaylight.netconf.api.monitoring.CapabilityListener)2 Capability (org.opendaylight.netconf.api.capability.Capability)1