Disconnection improvements.
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / connection / ConnectionManager.java
1 /*
2  * Copyright (c) 2015 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.openflowplugin.api.openflow.connection;
10
11 import org.opendaylight.openflowjava.protocol.api.connection.SwitchConnectionHandler;
12 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceConnectedHandler;
13 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler;
14
15 /**
16  * Connection manager manages connections with devices.
17  * It instantiates and registers {@link ConnectionContext}
18  * used for handling all communication with device when onSwitchConnected notification is processed.
19  */
20 public interface ConnectionManager extends SwitchConnectionHandler {
21
22     /**
23      * Method registers handler responsible handling operations related to connected device after
24      * device is connected.
25      * @param deviceConnectedHandler device connected handler
26      */
27     void setDeviceConnectedHandler(final DeviceConnectedHandler deviceConnectedHandler);
28
29     /**
30      * Method registers handler responsible handling device disconnected event
31      * @param deviceDisconnectedHandler device disconnected handler
32      */
33     void setDeviceDisconnectedHandler(final DeviceDisconnectedHandler deviceDisconnectedHandler);
34
35     /**
36      * Setter for echo reply timeout.
37      * @param echoReplyTimeout {@link Long} timeout
38      */
39     void setEchoReplyTimeout(long echoReplyTimeout);
40 }