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 com.google.common.base.Optional;
12 import org.w3c.dom.Document;
15 * NetconfMessage represents a wrapper around org.w3c.dom.Document. Needed for
16 * implementing ProtocolMessage interface.
18 public final class NetconfMessage {
20 private static final long serialVersionUID = 462175939836367285L;
22 private final Document doc;
24 private String additionalHeader;
26 public NetconfMessage(final Document doc) {
30 public NetconfMessage(Document doc, String additionalHeader) {
32 this.additionalHeader = additionalHeader;
35 public Document getDocument() {
39 public Optional<String> getAdditionalHeader() {
40 return additionalHeader== null ? Optional.<String>absent() : Optional.of(additionalHeader);