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
9 package org.opendaylight.openflowjava.protocol.spi.connection;
11 import java.util.Collection;
12 import java.util.List;
13 import java.util.concurrent.Future;
15 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
16 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
22 public interface SwitchConnectionProvider {
25 * @param configurations list of [protocol, port, address and supported features]
27 public void configure(Collection<ConnectionConfiguration> configurations);
30 * start listening to switches, but please don't forget to do
31 * {@link #setSwitchConnectionListener(SwitchConnectionHandler)} first
32 * @return future, triggered to true, when all listening channels are up and running
34 public Future<List<Boolean>> startup();
37 * stop listening to switches
38 * @return future, triggered to true, when all listening channels are down
40 public Future<Boolean> shutdown();
43 * @param switchConListener instance being informed when new switch connects
45 public void setSwitchConnectionListener(SwitchConnectionHandler switchConListener);