Getter methods should be final 96/5196/2
authorRobert Varga <rovarga@cisco.com>
Fri, 7 Feb 2014 23:40:38 +0000 (00:40 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Feb 2014 21:30:48 +0000 (21:30 +0000)
Change-Id: I24eafd9b1319e9296de5680220802820944fe333
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/netconf/netconf-api/src/main/java/org/opendaylight/controller/netconf/api/NetconfSession.java

index 6c747dbe244fde8812a17a8f923eff49c67fba4d..a4c66db16f07de9dcbb5c87a4c7403b87956e7f9 100644 (file)
@@ -8,26 +8,29 @@
 package org.opendaylight.controller.netconf.api;
 
 import io.netty.channel.Channel;
+
+import java.io.IOException;
+
 import org.opendaylight.protocol.framework.AbstractProtocolSession;
 import org.opendaylight.protocol.framework.SessionListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.IOException;
-
 public abstract class NetconfSession extends AbstractProtocolSession<NetconfMessage> {
-    protected final Channel channel;
-    private final SessionListener sessionListener;
+    private static final Logger logger = LoggerFactory.getLogger(NetconfSession.class);
+    private final SessionListener<NetconfMessage, NetconfSession, NetconfTerminationReason> sessionListener;
     private final long sessionId;
     private boolean up = false;
-    private static final Logger logger = LoggerFactory.getLogger(NetconfSession.class);
 
-    protected NetconfSession(SessionListener sessionListener, Channel channel, long sessionId) {
+    protected final Channel channel;
+
+    protected NetconfSession(SessionListener<NetconfMessage, NetconfSession, NetconfTerminationReason> sessionListener, Channel channel, long sessionId) {
         this.sessionListener = sessionListener;
         this.channel = channel;
         this.sessionId = sessionId;
         logger.debug("Session {} created", toString());
     }
+
     @Override
     public void close() {
         channel.close();
@@ -69,11 +72,11 @@ public abstract class NetconfSession extends AbstractProtocolSession<NetconfMess
         return sb.toString();
     }
 
-    public boolean isUp() {
+    public final boolean isUp() {
         return up;
     }
 
-    public long getSessionId() {
+    public final long getSessionId() {
         return sessionId;
     }
 }