776695b56c3b5fe7923297ca0a2ffd84a32472c9
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / plugin / ChannelConnectionHandler.java
1 /*
2  * Copyright (C) 2013 Red Hat, Inc.
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  * Authors : Madhu Venugopal, Brent Salisbury
9  */
10 package org.opendaylight.ovsdb.plugin;
11
12 import org.opendaylight.controller.sal.core.Node;
13
14 import io.netty.channel.ChannelFuture;
15 import io.netty.channel.ChannelFutureListener;
16
17 public class ChannelConnectionHandler implements ChannelFutureListener {
18     Node node;
19     ConnectionService connectionService;
20     public Node getNode() {
21         return node;
22     }
23     public void setNode(Node node) {
24         this.node = node;
25     }
26     public ConnectionService getConnectionService() {
27         return connectionService;
28     }
29     public void setConnectionService(ConnectionService connectionService) {
30         this.connectionService = connectionService;
31     }
32     @Override
33     public void operationComplete(ChannelFuture arg0) throws Exception {
34         connectionService.channelClosed(node);
35     }
36 }