Switch to JDT annotations for Nullable and NonNull
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / CentralizedSwitchProvider.java
1 /*
2  * Copyright (c) 2016 Hewlett Packard Enterprise, Co. 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
9 package org.opendaylight.netvirt.vpnmanager;
10
11 import java.math.BigInteger;
12 import javax.inject.Inject;
13 import javax.inject.Singleton;
14 import org.eclipse.jdt.annotation.Nullable;
15 import org.opendaylight.netvirt.vpnmanager.api.ICentralizedSwitchProvider;
16
17 @Singleton
18 public class CentralizedSwitchProvider implements ICentralizedSwitchProvider {
19
20     private final VpnUtil vpnUtil;
21
22     @Inject
23     public CentralizedSwitchProvider(VpnUtil vpnUtil) {
24         this.vpnUtil = vpnUtil;
25
26     }
27
28     @Override
29     @Nullable
30     public BigInteger getPrimarySwitchForRouter(String routerName) {
31         return vpnUtil.getPrimarySwitchForRouter(routerName);
32     }
33
34 }