2 * Copyright (c) 2018 Ericsson India Global Services Pvt Ltd. 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.genius.itm.itmdirecttunnels.workers;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import java.util.List;
12 import java.util.concurrent.Callable;
13 import org.opendaylight.genius.itm.utils.TunnelStateInfo;
15 public class TunnelStateAddWorkerForNodeConnector implements Callable<List<? extends ListenableFuture<?>>> {
16 private final TunnelStateAddWorker tunnelStateAddWorker;
17 private final TunnelStateInfo tunnelStateInfo;
19 public TunnelStateAddWorkerForNodeConnector(TunnelStateAddWorker tunnelStateAddWorker,
20 TunnelStateInfo tunnelStateInfo) {
21 this.tunnelStateAddWorker = tunnelStateAddWorker;
22 this.tunnelStateInfo = tunnelStateInfo;
26 public List<? extends ListenableFuture<?>> call() throws Exception {
27 // If another renderer(for eg : OVS) needs to be supported, check can be performed here
28 // to call the respective helpers.
29 return tunnelStateAddWorker.addState(tunnelStateInfo);
33 public String toString() {
34 return "TunnelStateAddWorkerForNodeConnector{tunnelStateInfo=" + tunnelStateInfo + '}';