Class AbstractReentrantDeserializationHandler
java.lang.Object
com.inductiveautomation.ignition.common.xmlserialization.deserialization.AbstractDeserializationHandler
com.inductiveautomation.ignition.common.xmlserialization.deserialization.AbstractReentrantDeserializationHandler
- All Implemented Interfaces:
DeserializationHandler
- Direct Known Subclasses:
AbstractBodyDecoderHandler
,AssociatedDataHandler
,BooleanHandler
,DocumentElementHandler
,EnumHandler
,IgPathHandler
,QualifiedPathHandler
,TagPathHandler
public abstract class AbstractReentrantDeserializationHandler
extends AbstractDeserializationHandler
This is a specialization of AbstractDeserializationHandler built for handlers that return false from
DeserializationHandler.supportsNestedElements()
and are designed to be re-entrant (do not store any state).
It stores the object and the reference ID as thread locals to support multi-threaded access.
-
Field Summary
FieldsFields inherited from class com.inductiveautomation.ignition.common.xmlserialization.deserialization.AbstractDeserializationHandler
object, refId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the most recent object that this handler created.int
getRefId()
Returns the reference id that was in the start of this element, or -1 if there was noneprotected void
void
setRefId
(int id) Sets the ref-id that was found at the start of this element, if any.Methods inherited from class com.inductiveautomation.ignition.common.xmlserialization.deserialization.AbstractDeserializationHandler
clone, endObject, endSubElement, startSubElement
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.common.xmlserialization.deserialization.DeserializationHandler
endElement, getBodyDecoder, getElementName, onBody, startElement, supportsNestedElements
-
Field Details
-
objectTL
-
refTL
-
-
Constructor Details
-
AbstractReentrantDeserializationHandler
public AbstractReentrantDeserializationHandler()
-
-
Method Details
-
getObject
Description copied from interface:DeserializationHandler
Returns the most recent object that this handler created. Note that a handler needs to have this function return its object as early as possible, not just after endElement() has been called. This is used for populating the reference map.- Specified by:
getObject
in interfaceDeserializationHandler
- Overrides:
getObject
in classAbstractDeserializationHandler
-
setObject
- Overrides:
setObject
in classAbstractDeserializationHandler
-
getRefId
public int getRefId()Description copied from interface:DeserializationHandler
Returns the reference id that was in the start of this element, or -1 if there was none- Specified by:
getRefId
in interfaceDeserializationHandler
- Overrides:
getRefId
in classAbstractDeserializationHandler
-
setRefId
public void setRefId(int id) Description copied from interface:DeserializationHandler
Sets the ref-id that was found at the start of this element, if any.- Specified by:
setRefId
in interfaceDeserializationHandler
- Overrides:
setRefId
in classAbstractDeserializationHandler
-