public class BindingNormalizedNodeCodecRegistry extends Object implements DataObjectSerializerRegistry, BindingCodecTreeFactory, BindingNormalizedNodeWriterFactory, BindingNormalizedNodeSerializer
Constructor and Description |
---|
BindingNormalizedNodeCodecRegistry(DataObjectSerializerGenerator generator) |
Modifier and Type | Method and Description |
---|---|
BindingCodecTree |
create(BindingRuntimeContext context)
Creates Binding Codec Tree for specified Binding runtime context.
|
BindingCodecTree |
create(org.opendaylight.yangtools.yang.model.api.SchemaContext context,
Class<?>... bindingClasses)
Creates Binding Codec Tree for specified Binding runtime context.
|
<T extends DataObject> |
deserializeFunction(InstanceIdentifier<T> path) |
Map.Entry<InstanceIdentifier<?>,DataObject> |
fromNormalizedNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path,
org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
Translates supplied YANG Instance Identifier and NormalizedNode into Binding data.
|
<T extends RpcInput> |
fromNormalizedNodeActionInput(Class<? extends Action<?,?,?>> action,
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode input)
Translates supplied ContainerNode action input.
|
<T extends RpcOutput> |
fromNormalizedNodeActionOutput(Class<? extends Action<?,?,?>> action,
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode output)
Translates supplied ContainerNode action output.
|
Notification |
fromNormalizedNodeNotification(org.opendaylight.yangtools.yang.model.api.SchemaPath path,
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode data)
Translates supplied NormalizedNode Notification into Binding data.
|
DataObject |
fromNormalizedNodeRpcData(org.opendaylight.yangtools.yang.model.api.SchemaPath path,
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode data)
Translates supplied NormalizedNode RPC input or output into Binding data.
|
InstanceIdentifier<?> |
fromYangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier dom)
Translates supplied YANG Instance Identifier into Binding instance identifier.
|
BindingCodecTree |
getCodecContext() |
DataObjectSerializer |
getSerializer(Class<? extends DataObject> type) |
BindingStreamEventWriter |
newActionInputWriter(Class<? extends Action<?,?,?>> action,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
Creates a
BindingStreamEventWriter for action input which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter . |
BindingStreamEventWriter |
newActionOutputWriter(Class<? extends Action<?,?,?>> action,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
Creates a
BindingStreamEventWriter for action output which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter . |
BindingStreamEventWriter |
newNotificationWriter(Class<? extends Notification> notification,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter streamWriter)
Creates a
BindingStreamEventWriter for notification which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter . |
BindingStreamEventWriter |
newRpcWriter(Class<? extends DataContainer> rpcInputOrOutput,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter streamWriter)
Creates a
BindingStreamEventWriter for RPC data which will translate to NormalizedNode model and invoke
proper events on supplied NormalizedNodeStreamWriter . |
BindingStreamEventWriter |
newWriter(InstanceIdentifier<?> path,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
Creates a
BindingStreamEventWriter for data tree path which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter . |
Map.Entry<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,BindingStreamEventWriter> |
newWriterAndIdentifier(InstanceIdentifier<?> path,
org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
Creates a
BindingStreamEventWriter for data tree path which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter . |
void |
onBindingRuntimeContextUpdated(BindingRuntimeContext context) |
BindingLazyContainerNode<RpcInput> |
toLazyNormalizedNodeActionInput(Class<? extends Action<?,?,?>> action,
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier identifier,
RpcInput input)
Lazily translates supplied Binding action input into NormalizedNode data.
|
BindingLazyContainerNode<RpcOutput> |
toLazyNormalizedNodeActionOutput(Class<? extends Action<?,?,?>> action,
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier identifier,
RpcOutput output)
Lazily translates supplied Binding action output into NormalizedNode data.
|
<T extends DataObject> |
toNormalizedNode(InstanceIdentifier<T> path,
T data)
Translates supplied Binding Instance Identifier and data into NormalizedNode representation.
|
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode |
toNormalizedNodeActionInput(Class<? extends Action<?,?,?>> action,
RpcInput input)
Translates supplied Binding action input into NormalizedNode data.
|
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode |
toNormalizedNodeActionOutput(Class<? extends Action<?,?,?>> action,
RpcOutput output)
Translates supplied Binding action output into NormalizedNode data.
|
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode |
toNormalizedNodeNotification(Notification data)
Translates supplied Binding Notification or output into NormalizedNode notification.
|
org.opendaylight.yangtools.yang.data.api.schema.ContainerNode |
toNormalizedNodeRpcData(DataContainer data)
Translates supplied Binding RPC input or output into NormalizedNode data.
|
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier |
toYangInstanceIdentifier(InstanceIdentifier<?> binding)
Translates supplied Binding Instance Identifier into NormalizedNode instance identifier.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toLazyNormalizedNodeActionInput, toLazyNormalizedNodeActionOutput
public BindingNormalizedNodeCodecRegistry(DataObjectSerializerGenerator generator)
public DataObjectSerializer getSerializer(Class<? extends DataObject> type)
getSerializer
in interface DataObjectSerializerRegistry
public BindingCodecTree getCodecContext()
public void onBindingRuntimeContextUpdated(BindingRuntimeContext context)
public org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier toYangInstanceIdentifier(InstanceIdentifier<?> binding)
BindingNormalizedNodeSerializer
toYangInstanceIdentifier
in interface BindingNormalizedNodeSerializer
binding
- Binding Instance Identifierpublic InstanceIdentifier<?> fromYangInstanceIdentifier(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier dom)
BindingNormalizedNodeSerializer
fromYangInstanceIdentifier
in interface BindingNormalizedNodeSerializer
dom
- YANG Instance Identifierpublic <T extends DataObject> Map.Entry<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>> toNormalizedNode(InstanceIdentifier<T> path, T data)
BindingNormalizedNodeSerializer
toNormalizedNode
in interface BindingNormalizedNodeSerializer
path
- Binding Instance Identifier pointing to datadata
- Data object representing datapublic org.opendaylight.yangtools.yang.data.api.schema.ContainerNode toNormalizedNodeNotification(Notification data)
BindingNormalizedNodeSerializer
toNormalizedNodeNotification
in interface BindingNormalizedNodeSerializer
data
- NormalizedNode representing notification datapublic org.opendaylight.yangtools.yang.data.api.schema.ContainerNode toNormalizedNodeRpcData(DataContainer data)
BindingNormalizedNodeSerializer
toNormalizedNodeRpcData
in interface BindingNormalizedNodeSerializer
data
- NormalizedNode representing rpc datapublic org.opendaylight.yangtools.yang.data.api.schema.ContainerNode toNormalizedNodeActionInput(Class<? extends Action<?,?,?>> action, RpcInput input)
BindingNormalizedNodeSerializer
toNormalizedNodeActionInput
in interface BindingNormalizedNodeSerializer
action
- Binding action classinput
- Binding action inputpublic org.opendaylight.yangtools.yang.data.api.schema.ContainerNode toNormalizedNodeActionOutput(Class<? extends Action<?,?,?>> action, RpcOutput output)
BindingNormalizedNodeSerializer
toNormalizedNodeActionOutput
in interface BindingNormalizedNodeSerializer
output
- Binding action outputpublic BindingLazyContainerNode<RpcInput> toLazyNormalizedNodeActionInput(Class<? extends Action<?,?,?>> action, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier identifier, RpcInput input)
BindingNormalizedNodeSerializer
toLazyNormalizedNodeActionInput
in interface BindingNormalizedNodeSerializer
action
- Binding action classinput
- Binding action inputpublic BindingLazyContainerNode<RpcOutput> toLazyNormalizedNodeActionOutput(Class<? extends Action<?,?,?>> action, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier identifier, RpcOutput output)
BindingNormalizedNodeSerializer
toLazyNormalizedNodeActionOutput
in interface BindingNormalizedNodeSerializer
action
- Binding action classoutput
- Binding action outputpublic Map.Entry<InstanceIdentifier<?>,DataObject> fromNormalizedNode(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
BindingNormalizedNodeSerializer
fromNormalizedNode
in interface BindingNormalizedNodeSerializer
path
- Binding Instance Identifierdata
- NormalizedNode representing datapublic Notification fromNormalizedNodeNotification(org.opendaylight.yangtools.yang.model.api.SchemaPath path, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode data)
BindingNormalizedNodeSerializer
fromNormalizedNodeNotification
in interface BindingNormalizedNodeSerializer
path
- Schema Path of Notification, schema path is absolute, and consists of Notification QName.data
- NormalizedNode representing datapublic DataObject fromNormalizedNodeRpcData(org.opendaylight.yangtools.yang.model.api.SchemaPath path, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode data)
BindingNormalizedNodeSerializer
fromNormalizedNodeRpcData
in interface BindingNormalizedNodeSerializer
path
- Schema path of RPC data, Schema path consists of rpc QName and input / output QName.data
- NormalizedNode representing datapublic <T extends RpcInput> T fromNormalizedNodeActionInput(Class<? extends Action<?,?,?>> action, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode input)
BindingNormalizedNodeSerializer
fromNormalizedNodeActionInput
in interface BindingNormalizedNodeSerializer
action
- Binding action classinput
- ContainerNode representing datapublic <T extends RpcOutput> T fromNormalizedNodeActionOutput(Class<? extends Action<?,?,?>> action, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode output)
BindingNormalizedNodeSerializer
fromNormalizedNodeActionOutput
in interface BindingNormalizedNodeSerializer
action
- Binding action classoutput
- ContainerNode representing datapublic Map.Entry<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,BindingStreamEventWriter> newWriterAndIdentifier(InstanceIdentifier<?> path, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
BindingNormalizedNodeWriterFactory
BindingStreamEventWriter
for data tree path which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter
.
Also provides translation of supplied Instance Identifier to YangInstanceIdentifier
so client code, does
not need to translate that separately.
If YangInstanceIdentifier
is not needed, please use
BindingNormalizedNodeWriterFactory.newWriter(InstanceIdentifier, NormalizedNodeStreamWriter)
method to conserve resources.
newWriterAndIdentifier
in interface BindingNormalizedNodeWriterFactory
path
- Binding Path in conceptual data tree, for which writer should
be instantiateddomWriter
- Stream writer on which events will be invoked.BindingStreamEventWriter
which will write to supplied NormalizedNodeStreamWriter
.public BindingStreamEventWriter newWriter(InstanceIdentifier<?> path, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
BindingNormalizedNodeWriterFactory
BindingStreamEventWriter
for data tree path which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter
.
This variant does not provide YANG instance identifier and is useful for use-cases, where
InstanceIdentifier
translation is done in other way, or YANG instance identifier is unnecessary
(e.g. notifications, RPCs).
newWriter
in interface BindingNormalizedNodeWriterFactory
path
- Binding Path in conceptual data tree, for which writer should
be instantiateddomWriter
- Stream writer on which events will be invoked.BindingStreamEventWriter
which will write to supplied NormalizedNodeStreamWriter
.public BindingStreamEventWriter newNotificationWriter(Class<? extends Notification> notification, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter streamWriter)
BindingNormalizedNodeWriterFactory
BindingStreamEventWriter
for notification which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter
.newNotificationWriter
in interface BindingNormalizedNodeWriterFactory
notification
- Binding class representing notification,
for which writer should be instantiatedstreamWriter
- Stream writer on which events will be invoked.BindingStreamEventWriter
which will write to supplied
NormalizedNodeStreamWriter
.public BindingStreamEventWriter newActionInputWriter(Class<? extends Action<?,?,?>> action, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
BindingNormalizedNodeWriterFactory
BindingStreamEventWriter
for action input which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter
.newActionInputWriter
in interface BindingNormalizedNodeWriterFactory
action
- Binding class representing action for which writer should be instantiateddomWriter
- Stream writer on which events will be invoked.BindingStreamEventWriter
which will write to supplied NormalizedNodeStreamWriter
.public BindingStreamEventWriter newActionOutputWriter(Class<? extends Action<?,?,?>> action, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter domWriter)
BindingNormalizedNodeWriterFactory
BindingStreamEventWriter
for action output which will translate to NormalizedNode model
and invoke proper events on supplied NormalizedNodeStreamWriter
.newActionOutputWriter
in interface BindingNormalizedNodeWriterFactory
action
- Binding class representing action for which writer should be instantiateddomWriter
- Stream writer on which events will be invoked.BindingStreamEventWriter
which will write to supplied NormalizedNodeStreamWriter
.public BindingStreamEventWriter newRpcWriter(Class<? extends DataContainer> rpcInputOrOutput, org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter streamWriter)
BindingNormalizedNodeWriterFactory
BindingStreamEventWriter
for RPC data which will translate to NormalizedNode model and invoke
proper events on supplied NormalizedNodeStreamWriter
.newRpcWriter
in interface BindingNormalizedNodeWriterFactory
rpcInputOrOutput
- Binding class representing RPC input or output,
for which writer should be instantiatedstreamWriter
- Stream writer on which events will be invoked.BindingStreamEventWriter
which will write to supplied
NormalizedNodeStreamWriter
.public <T extends DataObject> Function<Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>>,Optional<T>> deserializeFunction(InstanceIdentifier<T> path)
public BindingCodecTree create(BindingRuntimeContext context)
BindingCodecTreeFactory
create
in interface BindingCodecTreeFactory
context
- Binding Runtime Context for which Binding codecs should be
instantiated.public BindingCodecTree create(org.opendaylight.yangtools.yang.model.api.SchemaContext context, Class<?>... bindingClasses)
BindingCodecTreeFactory
create
in interface BindingCodecTreeFactory
context
- Binding Runtime Context for which Binding codecs should be
instantiated.bindingClasses
- Binding Runtime Context will be constructed using bindings
which contains specified classes, in order to support
deserialization in multi-classloader environment.Copyright © 2019 OpenDaylight. All rights reserved.