X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fimpl%2Fosgi%2FNetconfOperationRouterImpl.java;h=c2ab36f2c68ac8478d89fc14b02b6729e0ccf072;hp=bb4c76a4b89d327879e637a58a9ea4d919d26878;hb=9c9f6e506395f806978a955a8cf51ba736b978ad;hpb=b23703bef6c3aaafe2dc83608a03b738ad42f945 diff --git a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java index bb4c76a4b8..c2ab36f2c6 100644 --- a/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java +++ b/opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/osgi/NetconfOperationRouterImpl.java @@ -153,7 +153,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { } private NetconfOperationExecution getNetconfOperationWithHighestPriority( - Document message, NetconfServerSession session) { + Document message, NetconfServerSession session) throws NetconfDocumentedException { TreeMap sortedByPriority = getSortedNetconfOperationsWithCanHandle( message, session); @@ -166,7 +166,7 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { } private TreeMap getSortedNetconfOperationsWithCanHandle(Document message, - NetconfServerSession session) { + NetconfServerSession session) throws NetconfDocumentedException { TreeMap sortedPriority = Maps.newTreeMap(); for (NetconfOperation netconfOperation : allNetconfOperations) { @@ -185,6 +185,21 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter { return sortedPriority; } + public static final NetconfOperationChainedExecution EXECUTION_TERMINATION_POINT = new NetconfOperationChainedExecution() { + @Override + public boolean isExecutionTermination() { + return true; + } + + @Override + public Document execute(Document requestMessage) throws NetconfDocumentedException { + throw new NetconfDocumentedException("This execution represents the termination point in operation execution and cannot be executed itself", + NetconfDocumentedException.ErrorType.application, + NetconfDocumentedException.ErrorTag.operation_failed, + NetconfDocumentedException.ErrorSeverity.error); + } + }; + private static class NetconfOperationExecution implements NetconfOperationChainedExecution { private final NetconfOperation netconfOperation; private NetconfOperationChainedExecution subsequentExecution;