public abstract class AbstractReentrantDeserializationHandler extends AbstractDeserializationHandler
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.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.ThreadLocal<java.lang.Object> |
objectTL |
protected java.lang.ThreadLocal<java.lang.Integer> |
refTL |
object, refId| Constructor and Description |
|---|
AbstractReentrantDeserializationHandler() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getObject()
Returns 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 none
|
protected void |
setObject(java.lang.Object value) |
void |
setRefId(int id)
Sets the ref-id that was found at the start of this element, if any.
|
clone, endObject, endSubElement, startSubElementequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendElement, getBodyDecoder, getElementName, onBody, startElement, supportsNestedElementsprotected java.lang.ThreadLocal<java.lang.Object> objectTL
protected java.lang.ThreadLocal<java.lang.Integer> refTL
public AbstractReentrantDeserializationHandler()
public java.lang.Object getObject()
DeserializationHandlergetObject in interface DeserializationHandlergetObject in class AbstractDeserializationHandlerprotected void setObject(java.lang.Object value)
setObject in class AbstractDeserializationHandlerpublic int getRefId()
DeserializationHandlergetRefId in interface DeserializationHandlergetRefId in class AbstractDeserializationHandlerpublic void setRefId(int id)
DeserializationHandlersetRefId in interface DeserializationHandlersetRefId in class AbstractDeserializationHandler