public interface YangRuntimeService
| Modifier and Type | Method and Description |
|---|---|
CompositeData |
decode(CompositeStream external,
RuntimeContext context)
Decodes the external representation of a configuration model from the
specified composite stream into an in-memory representation.
|
CompositeStream |
encode(CompositeData internal,
RuntimeContext context)
Encodes the internal in-memory representation of a configuration model
to an external representation consumable from the resulting input stream.
|
CompositeData decode(CompositeStream external, RuntimeContext context)
Resource identifier stream "URI" will get decoded to resource identifier and resource data stream will get decoded to data node.
Protocols like NETCONF may opt only to have resource data without resource identifier, which implies the data node construction from logical root resource ("/").
Also protocols like NETCONF will have decorations around the input stream which will be reported back to protocol in output. Produced annotations will be in order of pre-order traversal.
external - composite input stream carrying external
representation of configuration datacontext - additional YANG runtime context informationYangRuntimeException - when fails to perform decode operationCompositeStream encode(CompositeData internal, RuntimeContext context)
Resource identifier in composite data will get encoded to resource identifier stream and data node will be encoded to resource data stream.
Logical root node "/" will be removed during encoding and will not be part of either resource identifier or data node.
Protocols like NETCONF may opt only to have data node with resource identifier as null in order to only get complete output in form of body without URI.
Also protocols like NETCONF would like to provide additional decorations for the node. These decoration should be in pre-order traversal order.
internal - in-memory representation of configuration datacontext - additional YANG runtime context informationYangRuntimeException - when fails to perform encode operationCopyright © 2018. All rights reserved.