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
9 package org.opendaylight.controller.netconf.api;
11 import org.w3c.dom.Document;
13 import com.google.common.base.Optional;
16 * NetconfMessage represents a wrapper around org.w3c.dom.Document. Needed for
17 * implementing ProtocolMessage interface.
19 public final class NetconfMessage {
20 private final String additionalHeader;
21 private final Document doc;
23 public NetconfMessage(final Document doc) {
27 public NetconfMessage(Document doc, String additionalHeader) {
29 this.additionalHeader = additionalHeader;
32 public Document getDocument() {
36 public Optional<String> getAdditionalHeader() {
37 return additionalHeader== null ? Optional.<String>absent() : Optional.of(additionalHeader);