X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fspi%2Fconnection%2FSwitchConnectionProvider.java;fp=openflow-protocol-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fspi%2Fconnection%2FSwitchConnectionProvider.java;h=c6f8ba48ad3bdbe7d2b1eb55799e8250c0c0d779;hb=b9971cbbb12d01c32cef5142e32c820524abbd95;hp=0000000000000000000000000000000000000000;hpb=3fc6dc47ec0f43299ce6595a403dccf8d3c95e74;p=openflowjava.git diff --git a/openflow-protocol-spi/src/main/java/org/opendaylight/openflowjava/protocol/spi/connection/SwitchConnectionProvider.java b/openflow-protocol-spi/src/main/java/org/opendaylight/openflowjava/protocol/spi/connection/SwitchConnectionProvider.java new file mode 100644 index 00000000..c6f8ba48 --- /dev/null +++ b/openflow-protocol-spi/src/main/java/org/opendaylight/openflowjava/protocol/spi/connection/SwitchConnectionProvider.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.spi.connection; + +import java.util.concurrent.Future; + +import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler; + +/** + * @author mirehak + * + */ +public interface SwitchConnectionProvider { + + /** + * @param configuration contains protocols, ports, addresses and similar connection parameters + * TODO - create configuration interface proposal + */ + public void configure(Object configuration); + + /** + * start listening to switches, but please don't forget to do + * {@link #setSwitchConnectionListener(SwitchConnectionHandler)} first + * @return future, triggered to true, when all listening channels are up and running + */ + public Future startup(); + + /** + * stop listening to switches + * @return future, triggered to true, when all listening channels are down + */ + public Future shutdown(); + + + /** + * @param switchConListener instance being informed when new switch connects + */ + public void setSwitchConnectionListener(SwitchConnectionHandler switchConListener); + +}