Added Yang code generation for Multipart messages
[openflowjava.git] / openflow-protocol-spi / src / main / java / org / opendaylight / openflowjava / protocol / spi / connection / SwitchConnectionProvider.java
1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
2
3 package org.opendaylight.openflowjava.protocol.spi.connection;
4
5 import java.util.Collection;
6 import java.util.List;
7 import java.util.concurrent.Future;
8
9 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionConfiguration;
10 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
11
12 /**
13  * @author mirehak
14  * @author michal.polkorab
15  *
16  */
17 public interface SwitchConnectionProvider {
18
19     /**
20      * @param configurations list of [protocol, port, address and supported features]
21      */
22     public void configure(Collection<ConnectionConfiguration> configurations);
23     
24     /**
25      * start listening to switches, but please don't forget to do
26      * {@link #setSwitchConnectionHandler(SwitchConnectionHandler)} first
27      * @return future, triggered to true, when all listening channels are up and running
28      */
29     public Future<List<Boolean>> startup();
30     
31     /**
32      * stop listening to switches
33      * @return future, triggered to true, when all listening channels are down
34      */
35     public Future<List<Boolean>> shutdown();
36     
37     /**
38      * @param switchConHandler instance being informed when new switch connects
39      */
40     public void setSwitchConnectionHandler(SwitchConnectionHandler switchConHandler);
41     
42 }