a955d13547130dfaf1c49dbbf1173614cc0231c0
[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  * @author michal.polkorab
19  */
20 public interface ConnectionAdapter extends OpenflowProtocolService {
21
22     /**
23      * disconnect corresponding switch
24      * @return future set to true, when disconnect completed
25      */
26     public Future<Boolean> disconnect();
27     
28     /**
29      * @return true, if connection to switch is alive
30      */
31     public boolean isAlive();
32     
33     /**
34      * @param messageListener here will be pushed all messages from switch
35      */
36     public void setMessageListener(OpenflowProtocolListener messageListener);
37
38 }