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 {
21 private static final long serialVersionUID = 462175939836367285L;
23 private final Document doc;
25 private String additionalHeader;
27 public NetconfMessage(final Document doc) {
31 public NetconfMessage(Document doc, String additionalHeader) {
33 this.additionalHeader = additionalHeader;
36 public Document getDocument() {
40 public Optional<String> getAdditionalHeader() {
41 return additionalHeader== null ? Optional.<String>absent() : Optional.of(additionalHeader);