Refactor config-persister: clean up exception handling and netconf client. 65/5065/1
authorTomas Olvecky <tolvecky@cisco.com>
Fri, 31 Jan 2014 13:51:08 +0000 (14:51 +0100)
committerTomas Olvecky <tolvecky@cisco.com>
Fri, 31 Jan 2014 13:51:16 +0000 (14:51 +0100)
commitc5b0b028392646507133df0af5efcee547763b6d
tree317450d7c669ef87ad7ea8373d4df1c4cd0aa781
parentba7242728c95c9fff87847843c9dcc3a0b88de7b
Refactor config-persister: clean up exception handling and netconf client.

Split ConfigPersisterNotificationHandler into registrator and listener, remove unnecessary
reference to NetconfClient.
Refactor ConfigPusher: each method now returns computational results instead of void. Avoid
unnecessary NetconfClient reference leak - close it after every use. Rename generic 'timeout'
to 'maxWaitForCapabilitiesMillis'. Avoid throwing and catching SAXException and IOException
as there is no recovery from them; keep only ConflictingVersionException.
ConfigPersisterActivator now actually uses the configurable timeout, the property is renamed
from 'pushTimeout' to 'maxWaitForCapabilitiesMillis'.

Change-Id: Idc9995b11dd2f19a90598c88eb7337d39d63fc27
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPersisterNotificationHandler.java
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/ConfigPusher.java
opendaylight/netconf/config-persister-impl/src/main/java/org/opendaylight/controller/netconf/persist/impl/osgi/ConfigPersisterActivator.java
opendaylight/netconf/netconf-client/src/main/java/org/opendaylight/controller/netconf/client/NetconfClient.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfConfigPersisterITTest.java