protocol-framework: final parameters
[controller.git] / opendaylight / commons / protocol-framework / src / main / java / org / opendaylight / protocol / framework / AbstractSessionNegotiator.java
index cbe923524516077497f806fdad9b74c4d84e9927..ec315bc0bd5bc3f565332c6c2e97134677ea9ef1 100644 (file)
@@ -25,8 +25,9 @@ import com.google.common.base.Preconditions;
  * needing to provide only
  *
  * @param <M> Protocol message type
- * @param <S> Protocol session type, has to extend ProtocolSession<M>
+ * @param <S> Protocol session type, has to extend {@code ProtocolSession<M>}
  */
+@Deprecated
 public abstract class AbstractSessionNegotiator<M, S extends AbstractProtocolSession<?>> extends ChannelInboundHandlerAdapter implements SessionNegotiator<S> {
     private final Logger LOG = LoggerFactory.getLogger(AbstractSessionNegotiator.class);
     private final Promise<S> promise;
@@ -46,7 +47,7 @@ public abstract class AbstractSessionNegotiator<M, S extends AbstractProtocolSes
         promise.setSuccess(session);
     }
 
-    protected final void negotiationFailed(final Throwable cause) {
+    protected void negotiationFailed(final Throwable cause) {
         LOG.debug("Negotiation on channel {} failed", channel, cause);
         channel.close();
         promise.setFailure(cause);
@@ -78,7 +79,7 @@ public abstract class AbstractSessionNegotiator<M, S extends AbstractProtocolSes
         LOG.debug("Starting session negotiation on channel {}", channel);
         try {
             startNegotiation();
-        } catch (Exception e) {
+        } catch (final Exception e) {
             LOG.warn("Unexpected negotiation failure", e);
             negotiationFailed(e);
         }
@@ -90,7 +91,7 @@ public abstract class AbstractSessionNegotiator<M, S extends AbstractProtocolSes
         LOG.debug("Negotiation read invoked on channel {}", channel);
         try {
             handleMessage((M)msg);
-        } catch (Exception e) {
+        } catch (final Exception e) {
             LOG.debug("Unexpected error while handling negotiation message {}", msg, e);
             negotiationFailed(e);
         }