ConnectionManager proposal
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / connection / ConnectionContextImpl.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 package org.opendaylight.openflowplugin.impl.connection;
9
10 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
11 import org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
14
15 /**
16  * 
17  */
18 public class ConnectionContextImpl implements ConnectionContext {
19
20     private ConnectionAdapter connectionAdapter;
21     private CONNECTION_STATE connectionState;
22     private FeaturesReply featuresReply;
23
24     /**
25      * @param connectionAdapter
26      */
27     public ConnectionContextImpl(ConnectionAdapter connectionAdapter) {
28         this.connectionAdapter = connectionAdapter;
29     }
30
31     @Override
32     public ConnectionAdapter getConnectionAdapter() {
33         return connectionAdapter;
34     }
35
36     @Override
37     public CONNECTION_STATE getConnectionState() {
38         return connectionState;
39     }
40
41     @Override
42     public NodeId getNodeId() {
43         // TODO Auto-generated method stub
44         return null;
45     }
46
47     @Override
48     public void setConnectionState(CONNECTION_STATE connectionState) {
49         this.connectionState = connectionState;
50     }
51
52     @Override
53     public FeaturesReply getFeatures() {
54         return featuresReply;
55     }
56
57     @Override
58     public void setFeatures(FeaturesReply featuresReply) {
59         this.featuresReply = featuresReply;
60         
61     }
62 }