-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
This interface is completely undocumented and has a bit unfriendly interface. The interaction of the callbacks does not enforce the lifecycle of the state introduced on RemoteDeviceHandler's onRemoteDeviceUp() and hence it is not clear when onRemoteDeviceDown() can (and should) be closed vs. when onRemoteDeviceFailed() should be called.
Fix this by refacting as follows:
public interface RemoteDeviceHandler extends AutoCloseable { @NonNull RemoteDeviceConnection onDeviceConnected(NetconfDeviceSchema deviceSchema, NetconfSessionPreferences sessionPreferences, RemoteDeviceServices services); void onDeviceFailed(@NonNull Throwable throwable); @Override void close(); } public abstract class RemoteDeviceConnection extends AbstractRegistration { public abstract void onNotification(@NonNull DOMNotification domNotification); }
This will force idem
- split from
-
NETCONF-1097 NETCONF connection status behavior change
- Resolved