}
synchronized void handleNotification(final NetconfMessage notification) {
- if(passNotifications) {
+ if (passNotifications) {
passNotification(transformNotification(notification));
} else {
queueNotification(notification);
/**
* Forward all cached notifications and pass all notifications from this point directly to sal facade.
- * @param messageTransformer
+ * @param messageTransformer Message transformer
*/
synchronized void onRemoteSchemaUp(final MessageTransformer<NetconfMessage> messageTransformer) {
this.messageTransformer = Preconditions.checkNotNull(messageTransformer);
private DOMNotification transformNotification(final NetconfMessage cachedNotification) {
final DOMNotification parsedNotification = messageTransformer.toNotification(cachedNotification);
- Preconditions.checkNotNull(parsedNotification, "%s: Unable to parse received notification: %s", id, cachedNotification);
+ Preconditions.checkNotNull(
+ parsedNotification, "%s: Unable to parse received notification: %s", id, cachedNotification);
return parsedNotification;
}
Preconditions.checkState(passNotifications == false);
LOG.debug("{}: Caching notification {}, remote schema not yet fully built", id, notification);
- if(LOG.isTraceEnabled()) {
+ if (LOG.isTraceEnabled()) {
LOG.trace("{}: Caching notification {}", id, XmlUtil.toString(notification.getDocument()));
}
private synchronized void passNotification(final DOMNotification parsedNotification) {
LOG.debug("{}: Forwarding notification {}", id, parsedNotification);
- if(filter == null || filter.filterNotification(parsedNotification).isPresent()) {
+ if (filter == null || filter.filterNotification(parsedNotification).isPresent()) {
salFacade.onNotification(parsedNotification);
}
}
messageTransformer = null;
}
- static interface NotificationFilter {
+ interface NotificationFilter {
Optional<DOMNotification> filterNotification(DOMNotification notification);
}