Class DataContainerStreamer<T extends DataContainer>
java.lang.Object
org.opendaylight.yangtools.binding.data.codec.impl.DataContainerStreamer<T>
- Type Parameters:
T
- DataContainer type
Base superclass for all concrete streamers, that is objects which are able to turn a concrete DataObject into a
stream of events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
serialize
(DataContainerSerializerRegistry reg, DataContainer obj, BindingStreamEventWriter stream) Writes stream events for supplied data object to provided stream.protected static final void
streamAnydata
(BindingStreamEventWriter writer, String localName, Object value) protected static final void
streamAnyxml
(BindingStreamEventWriter writer, String localName, Object value) protected static final void
streamAugmentations
(DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, Augmentable<?> obj) protected static final <C extends DataContainer>
voidstreamChoice
(Class<C> choiceClass, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, C value) protected static final <C extends DataObject>
voidstreamContainer
(DataContainerStreamer<C> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, C value) protected static final void
streamLeaf
(BindingStreamEventWriter writer, String localName, Object value) protected static final void
streamLeafList
(BindingStreamEventWriter writer, String localName, Set<?> value) protected static final <E extends DataObject>
voidstreamList
(Class<E> childClass, DataContainerStreamer<E> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, List<? extends E> value) protected static final <E extends EntryObject<?,
?>>
voidstreamMap
(Class<E> childClass, DataContainerStreamer<E> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, Map<?, ? extends E> value) protected static final void
streamOrderedLeafList
(BindingStreamEventWriter writer, String localName, List<?> value) protected static final <E extends EntryObject<?,
?>>
voidstreamOrderedMap
(Class<E> childClass, DataContainerStreamer<E> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, List<? extends E> value)
-
Constructor Details
-
DataContainerStreamer
protected DataContainerStreamer()
-
-
Method Details
-
serialize
protected abstract void serialize(DataContainerSerializerRegistry reg, DataContainer obj, BindingStreamEventWriter stream) throws IOException Writes stream events for supplied data object to provided stream.DataObjectSerializerRegistry may be used to lookup serializers for other generated classes in order to support writing their events.
- Throws:
IOException
-
streamAnydata
protected static final void streamAnydata(BindingStreamEventWriter writer, String localName, Object value) throws IOException - Throws:
IOException
-
streamAnyxml
protected static final void streamAnyxml(BindingStreamEventWriter writer, String localName, Object value) throws IOException - Throws:
IOException
-
streamAugmentations
protected static final void streamAugmentations(DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, Augmentable<?> obj) throws IOException - Throws:
IOException
-
streamChoice
protected static final <C extends DataContainer> void streamChoice(Class<C> choiceClass, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, C value) throws IOException - Throws:
IOException
-
streamContainer
protected static final <C extends DataObject> void streamContainer(DataContainerStreamer<C> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, C value) throws IOException - Throws:
IOException
-
streamLeaf
protected static final void streamLeaf(BindingStreamEventWriter writer, String localName, Object value) throws IOException - Throws:
IOException
-
streamLeafList
protected static final void streamLeafList(BindingStreamEventWriter writer, String localName, Set<?> value) throws IOException - Throws:
IOException
-
streamOrderedLeafList
protected static final void streamOrderedLeafList(BindingStreamEventWriter writer, String localName, List<?> value) throws IOException - Throws:
IOException
-
streamList
protected static final <E extends DataObject> void streamList(Class<E> childClass, DataContainerStreamer<E> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, List<? extends E> value) throws IOException - Throws:
IOException
-
streamMap
protected static final <E extends EntryObject<?,?>> void streamMap(Class<E> childClass, DataContainerStreamer<E> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, Map<?, ? extends E> value) throws IOException- Throws:
IOException
-
streamOrderedMap
protected static final <E extends EntryObject<?,?>> void streamOrderedMap(Class<E> childClass, DataContainerStreamer<E> childStreamer, DataContainerSerializerRegistry registry, BindingStreamEventWriter writer, List<? extends E> value) throws IOException - Throws:
IOException
-