2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.netconf.mapping.api;
10 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
11 import org.w3c.dom.Document;
14 * Single link in netconf operation execution chain.
15 * Wraps the execution of a single netconf operation.
17 public interface NetconfOperationChainedExecution {
20 * @return true if this is termination point in operation execution, false
21 * if there is a subsequent operation present that needs to be
24 boolean isExecutionTermination();
27 * Do not execute if this is termination point
29 Document execute(Document requestMessage) throws NetconfDocumentedException;
31 public static final NetconfOperationChainedExecution EXECUTION_TERMINATION_POINT = new NetconfOperationChainedExecution() {
33 public boolean isExecutionTermination() {
38 public Document execute(Document requestMessage) throws NetconfDocumentedException {
39 throw new IllegalStateException("This execution represents the termination point in operation execution and cannot be executed itself");