LOG.info("Session down");
}
- @Override
- public void onRemoteSessionFailed(final Throwable throwable) {
- LOG.info("Session failed");
- }
-
@Override
public void onNotification(final NetconfMessage notification) {
LOG.info("Notification received: {}", notification);
resetMessageTransformer();
}
- @Override
- public void onRemoteSessionFailed(final Throwable throwable) {
- setConnected(false);
- salFacade.onDeviceFailed(throwable);
- }
-
@Override
public void onNotification(final NetconfMessage notification) {
notificationHandler.handleNotification(notification);
salFacade.onDeviceDisconnected();
}
- @Override
- public void onRemoteSessionFailed(final Throwable throwable) {
- salFacade.onDeviceFailed(throwable);
- }
-
@Override
public void onNotification(final NetconfMessage notification) {
salFacade.onNotification(messageTransformer.toNotification(notification));
// FIXME: document this node
void onRemoteSessionDown();
- // FIXME: document this node
- void onRemoteSessionFailed(Throwable throwable);
-
// FIXME: document this node
void onNotification(NetconfMessage notification);
}
final SchemalessMessageTransformer messageTransformer = mock(SchemalessMessageTransformer.class);
final RemoteDeviceId remoteDeviceId = new RemoteDeviceId("test-D",
InetSocketAddress.createUnresolved("localhost", 22));
- final Throwable throwable = new Throwable();
final SchemalessNetconfDevice device = new SchemalessNetconfDevice(BASE_SCHEMAS, remoteDeviceId, facade,
messageTransformer);
device.onRemoteSessionDown();
verify(facade).onDeviceDisconnected();
-
- device.onRemoteSessionFailed(throwable);
- verify(facade).onDeviceFailed(throwable);
}
private static RemoteDeviceHandler getFacade() throws Exception {