Bug 591: Minimize the use of Xtend in sal-binding-broker-impl
[controller.git] / opendaylight / netconf / netconf-impl / src / main / java / org / opendaylight / controller / netconf / impl / osgi / NetconfOperationServiceFactoryListenerImpl.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.netconf.impl.osgi;
9
10 import java.util.HashSet;
11 import java.util.Set;
12
13 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationServiceFactory;
14
15 public class NetconfOperationServiceFactoryListenerImpl implements NetconfOperationServiceFactoryListener {
16     private final Set<NetconfOperationServiceFactory> allFactories = new HashSet<>();
17
18     @Override
19     public synchronized void onAddNetconfOperationServiceFactory(NetconfOperationServiceFactory service) {
20         allFactories.add(service);
21     }
22
23     @Override
24     public synchronized void onRemoveNetconfOperationServiceFactory(NetconfOperationServiceFactory service) {
25         allFactories.remove(service);
26     }
27
28     @Override
29     public synchronized NetconfOperationServiceSnapshot getSnapshot(long sessionId) {
30         return new NetconfOperationServiceSnapshot(allFactories, sessionId);
31     }
32
33 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.