@Beta public interface BindingCodecTreeNode<T extends DataObject> extends BindingNormalizedNodeCodec<T>
Modifier and Type | Interface and Description |
---|---|
static class |
BindingCodecTreeNode.ChildAddressabilitySummary
Enumeration of possible addressability attribute of all children.
|
Modifier and Type | Method and Description |
---|---|
@NonNull BindingCodecTreeNode<?> |
bindingPathArgumentChild(InstanceIdentifier.PathArgument arg,
@Nullable 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
the supplied list.
|
@NonNull BindingNormalizedNodeCachingCodec<T> |
createCachingCodec(@NonNull com.google.common.collect.ImmutableCollection<Class<? extends DataObject>> cacheSpecifier)
Returns codec which uses caches serialization / deserialization results.
|
InstanceIdentifier.PathArgument |
deserializePathArgument(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument arg)
Deserializes path argument for current node.
|
@NonNull Class<T> |
getBindingClass()
Returns binding class of interface which represents API of current schema node.
|
@NonNull BindingCodecTreeNode.ChildAddressabilitySummary |
getChildAddressabilitySummary()
Return a summary of addressability of potential children.
|
@NonNull org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus |
getSchema()
Return the schema node associated with this node.
|
<E extends DataObject> |
possibleStreamChild(@NonNull Class<E> childClass)
Returns child context as if it was walked by
BindingStreamEventWriter . |
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument |
serializePathArgument(InstanceIdentifier.PathArgument arg)
Serializes path argument for current node.
|
<E extends DataObject> |
streamChild(@NonNull 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) |
@NonNull BindingCodecTreeNode<?> |
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()
DataContainer.getImplementedInterface()
on instance of data.<E extends DataObject> @NonNull BindingCodecTreeNode<E> streamChild(@NonNull Class<E> childClass)
BindingStreamEventWriter
. This means that to enter case,
one must issue getChild(ChoiceClass).getChild(CaseClass).childClass
- Child class by Biding Stream navigationIllegalArgumentException
- If supplied child class is not valid in specified context.<E extends DataObject> Optional<? extends BindingCodecTreeNode<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 strict for interfaces representing
augmentation and cases, that may return BindingCodecTreeNode
even if augmentation interface containing
same data was supplied and does not represent augmentation of this node.
childClass
- @NonNull BindingCodecTreeNode<?> yangPathArgumentChild(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument child)
child
- Yang Instance Identifier ArgumentIllegalArgumentException
- If supplied argument does not represent valid child.@NonNull BindingCodecTreeNode<?> bindingPathArgumentChild(InstanceIdentifier.PathArgument 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 needed.IllegalArgumentException
- If supplied argument does not represent valid child.@NonNull BindingNormalizedNodeCachingCodec<T> createCachingCodec(@NonNull com.google.common.collect.ImmutableCollection<Class<? extends DataObject>> 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 place@Beta void writeAsNormalizedNode(T data, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter writer)
@Beta org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument serializePathArgument(InstanceIdentifier.PathArgument 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.@Beta InstanceIdentifier.PathArgument deserializePathArgument(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.@NonNull org.opendaylight.yangtools.yang.model.api.DocumentedNode.WithStatus getSchema()
@NonNull BindingCodecTreeNode.ChildAddressabilitySummary getChildAddressabilitySummary()
Copyright © 2019 OpenDaylight. All rights reserved.