Merge "add basic lib - plugin communication"
[openflowjava.git] / openflow-protocol-api / src / main / java / org / opendaylight / openflowjava / protocol / api / connection / ConnectionAdapter.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.api.connection;
10
11 import java.util.concurrent.Future;
12
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolListener;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OpenflowProtocolService;
15
16 /**
17  * @author mirehak
18  */
19 public interface ConnectionAdapter extends OpenflowProtocolService {
20
21     /**
22      * disconnect corresponding switch
23      * @return future set to true, when disconnect completed
24      */
25     public Future<Boolean> disconnect();
26     
27     /**
28      * @return true, if connection to switch is alive
29      */
30     public boolean isAlive();
31     
32     /**
33      * @param messageListener here will be pushed all messages from switch
34      */
35     public void setMessageListener(OpenflowProtocolListener messageListener);
36 }