2 * Copyright (c) 2013 Pantheon Technologies s.r.o. 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
10 package org.opendaylight.openflowjava.protocol.spi.connection;
12 import java.util.Collection;
13 import java.util.List;
14 import java.util.concurrent.Future;
16 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
17 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
21 * @author michal.polkorab
24 public interface SwitchConnectionProvider {
27 * @param configurations list of [protocol, port, address and supported features]
29 public void configure(Collection<ConnectionConfiguration> configurations);
32 * start listening to switches, but please don't forget to do
33 * {@link #setSwitchConnectionHandler(SwitchConnectionHandler)} first
34 * @return future, triggered to true, when all listening channels are up and running
36 public Future<List<Boolean>> startup();
39 * stop listening to switches
40 * @return future, triggered to true, when all listening channels are down
42 public Future<List<Boolean>> shutdown();
45 * @param switchConHandler instance being informed when new switch connects
47 public void setSwitchConnectionHandler(SwitchConnectionHandler switchConHandler);