Bug 1459-1 - Re-organize mdsal-binding2-spec
[mdsal.git] / binding2 / mdsal-binding2-spec / src / main / java / org / opendaylight / mdsal / binding2 / spec / runtime / TreeNodeSerializer.java
1 /*
2  * Copyright (c) 2017 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.mdsal.binding2.spec.runtime;
10
11 import com.google.common.annotations.Beta;
12 import java.io.IOException;
13 import org.opendaylight.mdsal.binding2.spec.TreeNode;
14
15 /*
16  * A serializer which writes TreeNode to supplied stream event writer.
17  */
18 @Beta
19 public interface TreeNodeSerializer {
20
21     /**
22      * Writes stream events representing object to supplied stream
23      *
24      * @param obj
25      *            Source of stream events
26      * @param stream
27      *            Stream to which events should be written.
28      */
29     void serialize(TreeNode obj, BindingStreamEventWriter stream) throws IOException;
30 }