Close missing resources when netconf-topolgy goes down 94/48094/4
authorAlexis de Talhouët <adetalhouet@inocybe.com>
Mon, 7 Nov 2016 23:00:04 +0000 (18:00 -0500)
committerJakub Morvay <jmorvay@cisco.com>
Wed, 11 Jan 2017 15:48:26 +0000 (15:48 +0000)
commit77cb41a716accda78004ca34f738884f8d4e6e74
tree44252b6094942b3c52ee663b134b220992ee2ad4
parent37364f148b9cd85bfca68d0be1bb4691bb452369
Close missing resources when netconf-topolgy goes down

When the connection goes down, we are closing the NetconfDeviceCommunicator
instance but we aren't closing the RemoteDeviceHandler. I believe this is an
oversight, so implementing the Autocloseable interface in NetconfConnectorDTO
that will close both the resources. The consumer of this DTO can then call #close()
to release the resources.

Change-Id: I852a5aa29a73f8454aa1886990dfce9c7a019025
Signed-off-by: Alexis de Talhouët <adetalhouet@inocybe.com>
netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/AbstractNetconfTopology.java
netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/impl/NetconfTopologyImpl.java