- private Document executeOperationWithHighestPriority(Document message, NetconfOperationExecution netconfOperationExecution, String messageAsString) throws NetconfDocumentedException {
- logger.debug("Forwarding netconf message {} to {}", messageAsString,
- netconfOperationExecution.operationWithHighestPriority);
-
- final LinkedList<NetconfOperationFilterChain> chain = new LinkedList<>();
- chain.push(netconfOperationExecution);
-
- for (Iterator<NetconfOperationFilter> it = allSortedFilters.descendingIterator(); it.hasNext();) {
- final NetconfOperationFilter filter = it.next();
- final NetconfOperationFilterChain prevItem = chain.getFirst();
- NetconfOperationFilterChain currentItem = new NetconfOperationFilterChain() {
- @Override
- public Document execute(Document message, NetconfOperationRouter operationRouter)
- throws NetconfDocumentedException {
- logger.trace("Entering {}", filter);
- return filter.doFilter(message, operationRouter, prevItem);
- }
- };
- chain.push(currentItem);
+ private Document executeOperationWithHighestPriority(final Document message,
+ final NetconfOperationExecution netconfOperationExecution)
+ throws NetconfDocumentedException {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Forwarding netconf message {} to {}", XmlUtil.toString(message), netconfOperationExecution.netconfOperation);