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.netconf.mapping.api;
10 import org.opendaylight.netconf.api.DocumentedException;
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 * Check if this is termination point in operation execution.
22 * @return true if this is termination point in operation execution, false
23 * if there is a subsequent operation present that needs to be
26 boolean isExecutionTermination();
29 * Do not execute if this is termination point.
31 Document execute(Document requestMessage) throws DocumentedException;
33 NetconfOperationChainedExecution EXECUTION_TERMINATION_POINT = new NetconfOperationChainedExecution() {
35 public boolean isExecutionTermination() {
40 public Document execute(Document requestMessage) {
41 throw new IllegalStateException("This execution represents the termination point in operation execution "
42 + "and cannot be executed itself");