@Beta public interface BindingCodecTreeNode<T extends DataObject> extends BindingNormalizedNodeCodec<T>, BindingCodecTreeNode<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 |
---|---|
BindingCodecTreeNode<?> |
bindingPathArgumentChild(InstanceIdentifier.PathArgument 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 DataObject>> cacheSpecifier)
Returns codec which uses caches serialization / deserialization results
Caching may introduce performance penalty to serialization / deserialization
but may decrease use of heap for repetitive objects.
|
InstanceIdentifier.PathArgument |
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.
|
BindingCodecTreeNode.ChildAddressabilitySummary |
getChildAddressabilitySummary()
Return a summary of addressability of potential children.
|
Object |
getSchema() |
<E extends DataObject> |
possibleStreamChild(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(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) |
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.getBindingClass
in interface BindingCodecTreeNode<T extends DataObject>
@Nonnull <E extends DataObject> BindingCodecTreeNode<E> streamChild(@Nonnull Class<E> childClass)
BindingStreamEventWriter
. This means that to enter case, one must
issue getChild(ChoiceClass).getChild(CaseClass).streamChild
in interface BindingCodecTreeNode<T extends DataObject>
childClass
- Child class by Biding Stream navigationIllegalArgumentException
- If supplied child class is not valid in specified context.<E extends DataObject> com.google.common.base.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
stricter 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.possibleStreamChild
in interface BindingCodecTreeNode<T extends DataObject>
childClass
- @Nonnull BindingCodecTreeNode<?> yangPathArgumentChild(@Nonnull org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument child)
yangPathArgumentChild
in interface BindingCodecTreeNode<T extends DataObject>
child
- Yang Instance Identifier ArgumentIllegalArgumentException
- If supplied argument does not represent valid child.@Nonnull BindingCodecTreeNode<?> bindingPathArgumentChild(@Nonnull InstanceIdentifier.PathArgument arg, @Nullable List<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> builder)
bindingPathArgumentChild
in interface BindingCodecTreeNode<T extends DataObject>
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)
createCachingCodec
in interface BindingCodecTreeNode<T extends DataObject>
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)
writeAsNormalizedNode
in interface BindingCodecTreeNode<T extends DataObject>
@Beta @Nullable org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument serializePathArgument(@Nullable InstanceIdentifier.PathArgument arg)
serializePathArgument
in interface BindingCodecTreeNode<T extends DataObject>
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 @Nullable InstanceIdentifier.PathArgument deserializePathArgument(@Nullable org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument arg)
deserializePathArgument
in interface BindingCodecTreeNode<T extends DataObject>
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.Object getSchema()
getSchema
in interface BindingCodecTreeNode<T extends DataObject>
@Nonnull BindingCodecTreeNode.ChildAddressabilitySummary getChildAddressabilitySummary()
Copyright © 2018 OpenDaylight. All rights reserved.