Copyright update
[openflowjava.git] / openflow-protocol-spi / src / main / java / org / opendaylight / openflowjava / protocol / spi / connection / SwitchConnectionProvider.java
1 /*
2  * Copyright (c) 2013 Pantheon Technologies s.r.o. 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
10 package org.opendaylight.openflowjava.protocol.spi.connection;
11
12 import java.util.Collection;
13 import java.util.List;
14 import java.util.concurrent.Future;
15
16 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
17 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
18
19 /**
20  * @author mirehak
21  * @author michal.polkorab
22  *
23  */
24 public interface SwitchConnectionProvider {
25
26     /**
27      * @param configurations list of [protocol, port, address and supported features]
28      */
29     public void configure(Collection<ConnectionConfiguration> configurations);
30     
31     /**
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
35      */
36     public Future<List<Boolean>> startup();
37     
38     /**
39      * stop listening to switches
40      * @return future, triggered to true, when all listening channels are down
41      */
42     public Future<List<Boolean>> shutdown();
43     
44     /**
45      * @param switchConHandler instance being informed when new switch connects
46      */
47     public void setSwitchConnectionHandler(SwitchConnectionHandler switchConHandler);
48     
49 }