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.concurrent.Future;
13 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
19 public interface SwitchConnectionProvider {
22 * @param configuration contains protocols, ports, addresses and similar connection parameters
23 * TODO - create configuration interface proposal
25 public void configure(Object configuration);
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
32 public Future<Boolean> startup();
35 * stop listening to switches
36 * @return future, triggered to true, when all listening channels are down
38 public Future<Boolean> shutdown();
42 * @param switchConListener instance being informed when new switch connects
44 public void setSwitchConnectionListener(SwitchConnectionHandler switchConListener);