T
- - Binding representation of data@Beta public interface BindingTreeNodeCodec<T extends TreeNode> extends BindingNormalizedNodeCodec<T>
Modifier and Type | Method and Description |
---|---|
BindingTreeNodeCodec<?> |
bindingPathArgumentChild(TreeArgument<?> arg,
List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder)
Returns nested node context using supplied Binding Instance Identifier
and adds YANG instance identifiers to supplied list.
|
BindingNormalizedNodeCachingCodec<T> |
createCachingCodec(com.google.common.collect.ImmutableCollection<Class<? extends TreeNode>> cacheSpecifier)
Returns codec which uses caches serialization / deserialization results.
|
TreeArgument<?> |
deserializePathArgument(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument arg)
Deserializes path argument for current node.
|
Class<T> |
getBindingClass()
Returns binding class of interface which represents API of current schema
node.
|
Object |
getSchema()
Return schema of node codec context.
|
<E extends TreeNode> |
possibleStreamChild(Class<E> childClass)
Returns child context as if it was walked by
BindingStreamEventWriter . |
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument |
serializePathArgument(TreeArgument<?> arg)
Serializes path argument for current node.
|
<E extends TreeNode> |
streamChild(Class<E> childClass)
Returns child context as if it was walked by
BindingStreamEventWriter . |
void |
writeAsNormalizedNode(T data,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer)
Writes data representing object to supplied stream.
|
BindingTreeNodeCodec<?> |
yangPathArgumentChild(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument child)
Returns nested node context using supplied YANG Instance Identifier.
|
deserialize, serialize
@Nonnull Class<T> getBindingClass()
@Nonnull <E extends TreeNode> BindingTreeNodeCodec<E> streamChild(@Nonnull Class<E> childClass)
BindingStreamEventWriter
. This means that to enter case, one must
issue getChild(ChoiceClass).getChild(CaseClass).E
- data typechildClass
- - child class by Biding Stream navigationIllegalArgumentException
- - if supplied child class is not valid in specified context<E extends TreeNode> Optional<? extends BindingTreeNodeCodec<E>> possibleStreamChild(@Nonnull Class<E> childClass)
BindingStreamEventWriter
. This means that to enter case, one must
issue getChild(ChoiceClass).getChild(CaseClass).
This method differs from streamChild(Class)
, that is less
stricter for interfaces representing augmentation and cases, that may
return BindingTreeNodeCodec
even if augmentation interface
containing same data was supplied and does not represent augmentation of
this node.E
- data typechildClass
- - child class by Binding Stream navigation@Nonnull BindingTreeNodeCodec<?> yangPathArgumentChild(@Nonnull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument child)
child
- - Yang Instance Identifier ArgumentIllegalArgumentException
- - if supplied argument does not represent valid child@Nonnull BindingTreeNodeCodec<?> bindingPathArgumentChild(@Nonnull TreeArgument<?> arg, @Nullable List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder)
arg
- - Binding Instance Identifier Argumentbuilder
- - mutable instance of list, which is appended by
YangInstanceIdentifiers as tree is walked, use null if such
side-product is not neededIllegalArgumentException
- - if supplied argument does not represent valid child.@Nonnull BindingNormalizedNodeCachingCodec<T> createCachingCodec(@Nonnull com.google.common.collect.ImmutableCollection<Class<? extends TreeNode>> cacheSpecifier)
Caching may introduce performance penalty to serialization / deserialization but may decrease use of heap for repetitive objects.
cacheSpecifier
- - set of objects, for which cache may be in placevoid writeAsNormalizedNode(T data, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer)
data
- - representing objectwriter
- - supplied stream@Nullable org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument serializePathArgument(@Nullable TreeArgument<?> arg)
arg
- - Binding Path Argument, may be null if Binding Instance
Identifier does not have representation for current node (e.g.
choice or case)IllegalArgumentException
- - if supplied arg
is not valid.@Nullable TreeArgument<?> deserializePathArgument(@Nullable org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument arg)
arg
- - Yang Path Argument, may be null if Yang Instance Identifier
does not have representation for current node (e.g. case)IllegalArgumentException
- - if supplied arg
is not valid.Copyright © 2019 OpenDaylight. All rights reserved.