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