2 * Copyright (c) 2019 PANTHEON.tech s.r.o. 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.yangtools.rfc8528.data.api;
10 import com.google.common.annotations.Beta;
11 import java.io.IOException;
12 import org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.opendaylight.yangtools.yang.data.api.schema.MountPointContext;
14 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
15 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriterExtension;
18 * A {@link NormalizedNodeStreamWriterExtension} exposed by stream writers which can handle mount point data, notably
19 * providing the facilities to resolve a mount point schema and normalize mount point contents into a normalized
24 public interface StreamWriterMountPointExtension extends NormalizedNodeStreamWriterExtension {
26 * Start a new mount point with a specific mount point context. The returned writer will be used to emit the content
27 * of the mount point, without touching the writer to which this extension is attached to. Once that is done, the
28 * returned writer will be {@link NormalizedNodeStreamWriter#close()}d, at which point the parent writer will be
29 * used again to emit the rest of the tree.
31 * @param mountId Mount point identifier
32 * @param mountCtx Mount point context
33 * @return A new NormalizedNodeStreamWriter
34 * @throws IOException if an error occurs
36 NormalizedNodeStreamWriter startMountPoint(MountPointIdentifier mountId, MountPointContext mountCtx)