Specialize RemoteDevice to NetconfMessage 12/103212/4
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 11 Nov 2022 22:52:28 +0000 (23:52 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 13 Nov 2022 13:04:26 +0000 (14:04 +0100)
The only specialization being used is NetconfMessage. Drop the generic
and instead require NetconfMessage. This pulls in
NetconfDeviceCommunicator in for the ride.

JIRA: NETCONF-912
Change-Id: Ie1859554477068b42f6d730744fabf9d199e195f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 files changed:
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/RemoteDeviceConnectorImpl.java
netconf/netconf-topology/src/main/java/org/opendaylight/netconf/topology/spi/AbstractNetconfTopology.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/api/DeviceActionFactory.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/api/RemoteDevice.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/api/RemoteDeviceCommunicator.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/DeviceActionFactoryImpl.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/NetconfDevice.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/SchemalessNetconfDevice.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/listener/NetconfDeviceCommunicator.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/NetconfDeviceRpc.java
netconf/sal-netconf-connector/src/main/java/org/opendaylight/netconf/sal/connect/netconf/sal/SchemalessNetconfDeviceRpc.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/listener/NetconfDeviceCommunicatorTest.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/NetconfDeviceRpcTest.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/sal/SchemalessNetconfDeviceRpcTest.java
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/util/NetconfBaseOpsTest.java
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/StressClient.java
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/StressClientCallable.java

index 0de0ea6bc3d39bc6921b985382b7c66e4c1035ac..0d753b4919a27b5a8553467cbf203142d7041e3d 100644 (file)
@@ -23,7 +23,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import org.opendaylight.aaa.encrypt.AAAEncryptionService;
-import org.opendaylight.netconf.api.NetconfMessage;
 import org.opendaylight.netconf.client.NetconfClientSessionListener;
 import org.opendaylight.netconf.client.conf.NetconfClientConfiguration;
 import org.opendaylight.netconf.client.conf.NetconfReconnectingClientConfiguration;
@@ -76,7 +75,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class RemoteDeviceConnectorImpl implements RemoteDeviceConnector {
-
     private static final Logger LOG = LoggerFactory.getLogger(RemoteDeviceConnectorImpl.class);
 
     // Initializes default constant instances for the case when the default schema repository
@@ -195,7 +193,7 @@ public class RemoteDeviceConnectorImpl implements RemoteDeviceConnector {
             }
         }
 
-        final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> device;
+        final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> device;
         if (node.getSchemaless()) {
             device = new SchemalessNetconfDevice(netconfTopologyDeviceSetup.getBaseSchemas(), remoteDeviceId,
                 salFacade);
@@ -318,12 +316,9 @@ public class RemoteDeviceConnectorImpl implements RemoteDeviceConnector {
     }
 
     private AuthenticationHandler getHandlerFromCredentials(final Credentials credentials) {
-        if (credentials instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
-                .rev150114.netconf.node.credentials.credentials.LoginPassword) {
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
-                    .rev150114.netconf.node.credentials.credentials.LoginPassword loginPassword
-                    = (org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
-                    .rev150114.netconf.node.credentials.credentials.LoginPassword) credentials;
+        if (credentials
+                instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.netconf.node
+                    .credentials.credentials.LoginPassword loginPassword) {
             return new LoginPasswordHandler(loginPassword.getUsername(), loginPassword.getPassword());
         }
         if (credentials instanceof LoginPwUnencrypted) {
index 2a47a126f4c4fb53ac7eae9397c5322db113fa9f..2903c026278b4d9b7f251b53bcd0bfbeaab140c1 100644 (file)
@@ -29,7 +29,6 @@ import org.opendaylight.controller.config.threadpool.ScheduledThreadPool;
 import org.opendaylight.controller.config.threadpool.ThreadPool;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.dom.api.DOMMountPointService;
-import org.opendaylight.netconf.api.NetconfMessage;
 import org.opendaylight.netconf.client.NetconfClientDispatcher;
 import org.opendaylight.netconf.client.NetconfClientSessionListener;
 import org.opendaylight.netconf.client.conf.NetconfClientConfiguration;
@@ -122,7 +121,7 @@ public abstract class AbstractNetconfTopology implements NetconfTopology {
         this.encryptionService = encryptionService;
         this.baseSchemas = requireNonNull(baseSchemas);
 
-        this.keystoreAdapter = new NetconfKeystoreAdapter(dataBroker);
+        keystoreAdapter = new NetconfKeystoreAdapter(dataBroker);
     }
 
     @Override
@@ -205,11 +204,11 @@ public abstract class AbstractNetconfTopology implements NetconfTopology {
         RemoteDeviceHandler<NetconfSessionPreferences> salFacade = createSalFacade(remoteDeviceId);
         if (keepaliveDelay > 0) {
             LOG.info("Adding keepalive facade, for device {}", nodeId);
-            salFacade = new KeepaliveSalFacade(remoteDeviceId, salFacade, this.keepaliveExecutor.getExecutor(),
+            salFacade = new KeepaliveSalFacade(remoteDeviceId, salFacade, keepaliveExecutor.getExecutor(),
                     keepaliveDelay, node.requireDefaultRequestTimeoutMillis().toJava());
         }
 
-        final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> device;
+        final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> device;
         final List<SchemaSourceRegistration<?>> yanglibRegistrations;
         if (node.requireSchemaless()) {
             device = new SchemalessNetconfDevice(baseSchemas, remoteDeviceId, salFacade);
@@ -220,7 +219,7 @@ public abstract class AbstractNetconfTopology implements NetconfTopology {
             device = new NetconfDeviceBuilder()
                 .setReconnectOnSchemasChange(reconnectOnChangedSchema)
                 .setSchemaResourcesDTO(resources)
-                .setGlobalProcessingExecutor(this.processingExecutor)
+                .setGlobalProcessingExecutor(processingExecutor)
                 .setId(remoteDeviceId)
                 .setSalFacade(salFacade)
                 .setNode(node)
@@ -336,12 +335,9 @@ public abstract class AbstractNetconfTopology implements NetconfTopology {
     }
 
     private AuthenticationHandler getHandlerFromCredentials(final Credentials credentials) {
-        if (credentials instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
-                .rev150114.netconf.node.credentials.credentials.LoginPassword) {
-            final org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
-                    .rev150114.netconf.node.credentials.credentials.LoginPassword loginPassword
-                    = (org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
-                    .rev150114.netconf.node.credentials.credentials.LoginPassword) credentials;
+        if (credentials
+                instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology
+                    .rev150114.netconf.node.credentials.credentials.LoginPassword loginPassword) {
             return new LoginPasswordHandler(loginPassword.getUsername(), loginPassword.getPassword());
         }
         if (credentials instanceof LoginPwUnencrypted) {
index 2c505e87cbcee48ec403c8f294f0edc8a93e6fc4..463b18927bfa2d57a8bbbdcc50e2f77665892903 100644 (file)
@@ -12,7 +12,6 @@ import org.opendaylight.netconf.api.NetconfMessage;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public interface DeviceActionFactory {
-
     /**
      * Allows user to create DOMActionService for specific device.
      *
@@ -22,7 +21,7 @@ public interface DeviceActionFactory {
      * @return {@link DOMActionService} of specific device
      */
     default DOMActionService createDeviceAction(final MessageTransformer<NetconfMessage> messageTransformer,
-            final RemoteDeviceCommunicator<NetconfMessage> listener, final SchemaContext schemaContext) {
+            final RemoteDeviceCommunicator listener, final SchemaContext schemaContext) {
         return null;
     }
 }
index e4f45f64bc587d7e45833ce493eff5c7a3a66deb..6cb40237032bae9c9badfa842491f7baf1d5d05c 100644 (file)
@@ -7,10 +7,12 @@
  */
 package org.opendaylight.netconf.sal.connect.api;
 
+import org.opendaylight.netconf.api.NetconfMessage;
+
 /**
  * Remote device.
  */
-public interface RemoteDevice<PREF, M, LISTENER extends RemoteDeviceCommunicator<M>> {
+public interface RemoteDevice<PREF, LISTENER extends RemoteDeviceCommunicator> {
 
     void onRemoteSessionUp(PREF remoteSessionCapabilities, LISTENER listener);
 
@@ -18,5 +20,5 @@ public interface RemoteDevice<PREF, M, LISTENER extends RemoteDeviceCommunicator
 
     void onRemoteSessionFailed(Throwable throwable);
 
-    void onNotification(M notification);
+    void onNotification(NetconfMessage notification);
 }
index efae796ad29bf65e1157e6724a72db08b8e127bd..116cb293b5f245df03f62d4a4968d94d277c5116 100644 (file)
@@ -8,12 +8,13 @@
 package org.opendaylight.netconf.sal.connect.api;
 
 import com.google.common.util.concurrent.ListenableFuture;
+import org.opendaylight.netconf.api.NetconfMessage;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
-public interface RemoteDeviceCommunicator<M> extends AutoCloseable {
+public interface RemoteDeviceCommunicator extends AutoCloseable {
 
-    ListenableFuture<RpcResult<M>> sendRequest(M message, QName rpc);
+    ListenableFuture<RpcResult<NetconfMessage>> sendRequest(NetconfMessage message, QName rpc);
 
     @Override
     void close();
index 6f48d89bde4364670248ca037e658da74e702dff..76d755fcd95f4c9b681cc212a1ed70e77c0ce7b3 100644 (file)
@@ -37,7 +37,7 @@ public class DeviceActionFactoryImpl implements DeviceActionFactory {
 
     @Override
     public DOMActionService createDeviceAction(final MessageTransformer<NetconfMessage> messageTransformer,
-            final RemoteDeviceCommunicator<NetconfMessage> listener, final SchemaContext schemaContext) {
+            final RemoteDeviceCommunicator listener, final SchemaContext schemaContext) {
         return (schemaPath, dataTreeIdentifier, input) -> {
             requireNonNull(schemaPath);
             requireNonNull(dataTreeIdentifier);
index 5d9f5731775c97a5c8c69abafb89b6e4ae3714bc..6e05e89a56cfd3c3d4ce1d5ee25eb560975935b1 100644 (file)
@@ -85,8 +85,7 @@ import org.slf4j.LoggerFactory;
 /**
  *  This is a mediator between NetconfDeviceCommunicator and NetconfDeviceSalFacade.
  */
-public class NetconfDevice
-        implements RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> {
+public class NetconfDevice implements RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> {
     private static final Logger LOG = LoggerFactory.getLogger(NetconfDevice.class);
 
     private static final QName RFC8528_SCHEMA_MOUNTS_QNAME = QName.create(
@@ -244,9 +243,8 @@ public class NetconfDevice
     }
 
     private synchronized void handleSalInitializationSuccess(final MountPointContext result,
-                                        final NetconfSessionPreferences remoteSessionCapabilities,
-                                        final DOMRpcService deviceRpc,
-                                        final RemoteDeviceCommunicator<NetconfMessage> listener) {
+            final NetconfSessionPreferences remoteSessionCapabilities, final DOMRpcService deviceRpc,
+            final RemoteDeviceCommunicator listener) {
         //NetconfDevice.SchemaSetup can complete after NetconfDeviceCommunicator was closed. In that case do nothing,
         //since salFacade.onDeviceDisconnected was already called.
         if (connected) {
@@ -265,8 +263,7 @@ public class NetconfDevice
         }
     }
 
-    private void handleSalInitializationFailure(final Throwable throwable,
-                                                final RemoteDeviceCommunicator<NetconfMessage> listener) {
+    private void handleSalInitializationFailure(final Throwable throwable, final RemoteDeviceCommunicator listener) {
         LOG.error("{}: Initialization in sal failed, disconnecting from device", id, throwable);
         listener.close();
         onRemoteSessionDown();
@@ -364,7 +361,7 @@ public class NetconfDevice
     }
 
     protected NetconfDeviceRpc getDeviceSpecificRpc(final MountPointContext result,
-            final RemoteDeviceCommunicator<NetconfMessage> listener, final BaseSchema schema) {
+            final RemoteDeviceCommunicator listener, final BaseSchema schema) {
         return new NetconfDeviceRpc(result.getEffectiveModelContext(), listener,
             new NetconfMessageTransformer(result, true, schema));
     }
index 2d2d0e29bdc5210303e96c4cb2816d82cdf34465..086b595503af1443df5d2add2fb8b0d519662e95 100644 (file)
@@ -22,8 +22,7 @@ import org.opendaylight.netconf.sal.connect.netconf.schema.mapping.SchemalessMes
 import org.opendaylight.netconf.sal.connect.util.MessageCounter;
 import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
 
-public class SchemalessNetconfDevice
-        implements RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> {
+public class SchemalessNetconfDevice implements RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> {
     private final BaseNetconfSchemas baseSchemas;
     private final RemoteDeviceId id;
     private final RemoteDeviceHandler<NetconfSessionPreferences> salFacade;
index e5e93502e3ea90c9435c3e738388af9807b708dc..b70e322fdf80ae8d5e864ef5d4cc74f4735bef71 100644 (file)
@@ -47,12 +47,10 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class NetconfDeviceCommunicator
-        implements NetconfClientSessionListener, RemoteDeviceCommunicator<NetconfMessage> {
-
+public class NetconfDeviceCommunicator implements NetconfClientSessionListener, RemoteDeviceCommunicator {
     private static final Logger LOG = LoggerFactory.getLogger(NetconfDeviceCommunicator.class);
 
-    protected final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> remoteDevice;
+    protected final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> remoteDevice;
     private final Optional<UserPreferences> overrideNetconfCapabilities;
     protected final RemoteDeviceId id;
     private final Lock sessionLock = new ReentrantLock();
@@ -81,21 +79,21 @@ public class NetconfDeviceCommunicator
 
     public NetconfDeviceCommunicator(
             final RemoteDeviceId id,
-            final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> remoteDevice,
+            final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> remoteDevice,
             final UserPreferences netconfSessionPreferences, final int rpcMessageLimit) {
         this(id, remoteDevice, Optional.of(netconfSessionPreferences), rpcMessageLimit);
     }
 
     public NetconfDeviceCommunicator(
             final RemoteDeviceId id,
-            final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> remoteDevice,
+            final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> remoteDevice,
             final int rpcMessageLimit) {
         this(id, remoteDevice, Optional.empty(), rpcMessageLimit);
     }
 
     private NetconfDeviceCommunicator(
             final RemoteDeviceId id,
-            final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> remoteDevice,
+            final RemoteDevice<NetconfSessionPreferences,  NetconfDeviceCommunicator> remoteDevice,
             final Optional<UserPreferences> overrideNetconfCapabilities, final int rpcMessageLimit) {
         concurentRpcMsgs = rpcMessageLimit;
         this.id = id;
index 6c7ecc1fd1d14e9ed5e4ba818c82a1db8353a2fb..f0f01ec910460bfb2a8e3797db76168e0037a66f 100644 (file)
@@ -36,12 +36,11 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
  * Invokes RPC by sending netconf message via listener. Also transforms result from NetconfMessage to CompositeNode.
  */
 public final class NetconfDeviceRpc implements DOMRpcService {
-    private final RemoteDeviceCommunicator<NetconfMessage> communicator;
+    private final RemoteDeviceCommunicator communicator;
     private final MessageTransformer<NetconfMessage> transformer;
     private final SchemaContext schemaContext;
 
-    public NetconfDeviceRpc(final SchemaContext schemaContext,
-            final RemoteDeviceCommunicator<NetconfMessage> communicator,
+    public NetconfDeviceRpc(final SchemaContext schemaContext, final RemoteDeviceCommunicator communicator,
             final MessageTransformer<NetconfMessage> transformer) {
         this.communicator = communicator;
         this.transformer = transformer;
index 0bbff2a2f762f50da662587712ea568a4a6447f3..af6bd7515aa036a9f0ec0c813f21b0f85575d808 100644 (file)
@@ -36,19 +36,18 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
  */
 public final class SchemalessNetconfDeviceRpc implements DOMRpcService {
 
-    private final RemoteDeviceCommunicator<NetconfMessage> listener;
+    private final RemoteDeviceCommunicator listener;
     private final BaseRpcSchemalessTransformer baseRpcTransformer;
     private final SchemalessMessageTransformer schemalessTransformer;
     private final RemoteDeviceId deviceId;
 
-    public SchemalessNetconfDeviceRpc(final RemoteDeviceId deviceId,
-                                      final RemoteDeviceCommunicator<NetconfMessage> listener,
-                                      final BaseRpcSchemalessTransformer baseRpcTransformer,
-                                      final SchemalessMessageTransformer messageTransformer) {
+    public SchemalessNetconfDeviceRpc(final RemoteDeviceId deviceId, final RemoteDeviceCommunicator listener,
+            final BaseRpcSchemalessTransformer baseRpcTransformer,
+            final SchemalessMessageTransformer messageTransformer) {
         this.deviceId = deviceId;
         this.listener = listener;
         this.baseRpcTransformer = baseRpcTransformer;
-        this.schemalessTransformer = messageTransformer;
+        schemalessTransformer = messageTransformer;
     }
 
     @Override
index bc71edb422b38a1123918f164215976f343959db..d53e2f94f3554132750ac97a2073ea2278c0e843 100644 (file)
@@ -86,7 +86,7 @@ public class NetconfDeviceCommunicatorTest {
     NetconfClientSession mockSession;
 
     @Mock
-    RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> mockDevice;
+    RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> mockDevice;
 
     NetconfDeviceCommunicator communicator;
 
@@ -385,8 +385,7 @@ public class NetconfDeviceCommunicatorTest {
      */
     @Test
     public void testNetconfDeviceReconnectInCommunicator() {
-        final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> device =
-                mock(RemoteDevice.class);
+        final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> device = mock(RemoteDevice.class);
 
         final TimedReconnectStrategy timedReconnectStrategy =
                 new TimedReconnectStrategy(GlobalEventExecutor.INSTANCE, 10000, 0, 1.0, null, 100L, null);
index defaee1d162f958f65613cf58d8d4923e33227f8..87de50aac27f2f5d3a7103cca66b8396b7ba62db 100644 (file)
@@ -60,7 +60,7 @@ public class NetconfDeviceRpcTest extends AbstractBaseSchemasTest {
     @Mock
     private DOMRpcAvailabilityListener listener;
     @Mock
-    private RemoteDeviceCommunicator<NetconfMessage> communicator;
+    private RemoteDeviceCommunicator communicator;
 
     private NetconfDeviceRpc rpc;
     private QName type;
@@ -99,7 +99,7 @@ public class NetconfDeviceRpcTest extends AbstractBaseSchemasTest {
     public void testDeadlock() throws Exception {
         // when rpc is successful, but transformer fails for some reason
         final MessageTransformer<NetconfMessage> failingTransformer = mock(MessageTransformer.class);
-        final RemoteDeviceCommunicator<NetconfMessage> communicatorMock = mock(RemoteDeviceCommunicator.class);
+        final RemoteDeviceCommunicator communicatorMock = mock(RemoteDeviceCommunicator.class);
         final NetconfMessage msg = null;
         final RpcResult<NetconfMessage> result = RpcResultBuilder.success(msg).build();
         when(communicatorMock.sendRequest(any(), any())).thenReturn(Futures.immediateFuture(result));
index 47378ca92d1cfd9b44adfae8dd1c64a54ebb1d7a..3445d9232372353522f30a682e9d54bbddbf8716 100644 (file)
@@ -39,11 +39,10 @@ import org.slf4j.LoggerFactory;
 
 @RunWith(MockitoJUnitRunner.StrictStubs.class)
 public class SchemalessNetconfDeviceRpcTest extends AbstractBaseSchemasTest {
-
     private static final Logger LOG = LoggerFactory.getLogger(SchemalessNetconfDeviceRpcTest.class);
 
     @Mock
-    private RemoteDeviceCommunicator<NetconfMessage> listener;
+    private RemoteDeviceCommunicator listener;
 
     private SchemalessNetconfDeviceRpc deviceRpc;
 
index 567fa744d767dffe5e4eda1f9594ca7412f3f119..ae7ad4b53f379c443a93b26b39002f367822c3ae 100644 (file)
@@ -87,7 +87,7 @@ public class NetconfBaseOpsTest extends AbstractTestModelTest {
     }
 
     @Mock
-    private RemoteDeviceCommunicator<NetconfMessage> listener;
+    private RemoteDeviceCommunicator listener;
     private NetconfRpcFutureCallback callback;
     private NetconfBaseOps baseOps;
 
index 967f8ae34fae80049d162345fade07989b442159..729223454f21cdff8d355e2c543f371c4b3f5396 100644 (file)
@@ -259,8 +259,7 @@ public final class StressClient {
         return null;
     }
 
-    static class LoggingRemoteDevice
-            implements RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> {
+    static class LoggingRemoteDevice implements RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> {
         @Override
         public void onRemoteSessionUp(final NetconfSessionPreferences remoteSessionCapabilities,
                                       final NetconfDeviceCommunicator netconfDeviceCommunicator) {
@@ -282,5 +281,4 @@ public final class StressClient {
             LOG.info("Notification received: {}", notification.toString());
         }
     }
-
 }
index 62733ba81656ca6d182c42c7c0b244975364a0c5..600c50cf4a475c72c171e31b7acdc8c00510237c 100644 (file)
@@ -75,7 +75,7 @@ public class StressClientCallable implements Callable<Boolean> {
 
     private static NetconfDeviceCommunicator getSessionListener(
             final InetSocketAddress inetAddress, final int messageLimit) {
-        final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> loggingRemoteDevice =
+        final RemoteDevice<NetconfSessionPreferences, NetconfDeviceCommunicator> loggingRemoteDevice =
             new StressClient.LoggingRemoteDevice();
         return new NetconfDeviceCommunicator(
             new RemoteDeviceId("secure-test", inetAddress), loggingRemoteDevice, messageLimit);