2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.netconf.impl.osgi;
10 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationProvider;
11 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
13 import java.util.HashSet;
16 public class NetconfOperationServiceFactoryListenerImpl implements NetconfOperationServiceFactoryListener,
17 NetconfOperationProvider {
18 private final Set<NetconfOperationServiceFactory> allFactories = new HashSet<>();
21 public synchronized void onAddNetconfOperationServiceFactory(NetconfOperationServiceFactory service) {
22 allFactories.add(service);
26 public synchronized void onRemoveNetconfOperationServiceFactory(NetconfOperationServiceFactory service) {
27 allFactories.remove(service);
31 public synchronized NetconfOperationServiceSnapshotImpl openSnapshot(String sessionIdForReporting) {
32 return new NetconfOperationServiceSnapshotImpl(allFactories, sessionIdForReporting);