Merge "add basic lib - plugin communication"
[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.concurrent.Future;
12
13 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
14
15 /**
16  * @author mirehak
17  *
18  */
19 public interface SwitchConnectionProvider {
20
21     /**
22      * @param configuration contains protocols, ports, addresses and similar connection parameters
23      * TODO - create configuration interface proposal
24      */
25     public void configure(Object configuration);
26     
27     /**
28      * start listening to switches, but please don't forget to do
29      * {@link #setSwitchConnectionListener(SwitchConnectionHandler)} first
30      * @return future, triggered to true, when all listening channels are up and running
31      */
32     public Future<Boolean> startup();
33     
34     /**
35      * stop listening to switches
36      * @return future, triggered to true, when all listening channels are down
37      */
38     public Future<Boolean> shutdown();
39     
40     
41     /**
42      * @param switchConListener instance being informed when new switch connects
43      */
44     public void setSwitchConnectionListener(SwitchConnectionHandler switchConListener);
45     
46 }