* <p>
* Then schedule next keepalive.
*/
- private void resetKeepalive() {
+ void resetKeepalive() {
LOG.trace("{}: Resetting netconf keepalive timer", id);
if (currentKeepalive != null) {
currentKeepalive.cancel(false);
currentDeviceRpc = null;
}
- private void reconnect() {
+ void reconnect() {
Preconditions.checkState(listener != null, "%s: Unable to reconnect, session listener is missing", id);
stopKeepalives();
LOG.info("{}: Reconnecting inactive netconf session", id);
* DOMRpcService proxy that attaches reset-keepalive-task and schedule
* request-timeout-task to each RPC invocation.
*/
- private static final class KeepaliveDOMRpcService implements DOMRpcService {
+ public static final class KeepaliveDOMRpcService implements DOMRpcService {
private final DOMRpcService deviceRpc;
private ResetKeepalive resetKeepaliveTask;
this.executor = executor;
}
+ public DOMRpcService getDeviceRpc() {
+ return deviceRpc;
+ }
+
@Nonnull
@Override
public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull final SchemaPath type,