BUG-190 Simplify reconnect logic in protocol-framework. 97/8897/6
authorMaros Marsalek <mmarsale@cisco.com>
Wed, 9 Jul 2014 08:05:23 +0000 (10:05 +0200)
committerMaros Marsalek <mmarsale@cisco.com>
Mon, 28 Jul 2014 15:36:59 +0000 (17:36 +0200)
commit1d364bf55905f619173d65a4823c6d594c5f29fe
tree0503e17ce43024e7d3411089cde792c799bd2c51
parent244d226cc66672e2e15d0b557bd1af37153d8065
BUG-190 Simplify reconnect logic in protocol-framework.

- Removed duplicate code from ReconnectPromise (almost the same code in ProtocolSessionPromise)
- ReconnectPromise now only calls ProtocolSessionPromise.connect (once right away to connect initially,
then every time channel is closed by dropped session)
- Removed second ReconnectingStrategyFactory from ReconnectPromise and AbstractDispatcher.createReconnectingClient
(Kept in AbstractDispatcher for backwards compatibility as deprecated). Only one factory needed for reconnecting client
- Added unit tests to ServerTest to test different cases of reconnecting
- Slightly refactored ProtocolSessionPromise to make code more readable

Change-Id: If3af8f468e7d59822c984cf814d15460ab35921f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
opendaylight/commons/protocol-framework/pom.xml
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/AbstractDispatcher.java
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/ProtocolSessionPromise.java
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/ReconnectPromise.java
opendaylight/commons/protocol-framework/src/main/java/org/opendaylight/protocol/framework/SessionListener.java
opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/ServerTest.java
opendaylight/commons/protocol-framework/src/test/java/org/opendaylight/protocol/framework/SimpleDispatcher.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.