|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.Coordinator
public abstract class Coordinator
Object that coordinates the marshalling/unmarshalling.
This class takes care of the logic that allows code to obtain
UnmarshallingContext
and XMLSerializer
instances
during the unmarshalling/marshalling.
This is done by using a ThreadLocal
. Therefore one unmarshalling/marshalling
episode has to be done from the beginning till end by the same thread.
(Note that the same Coordinator
can be then used by a different thread
for an entirely different episode.)
This class also maintains the user-configured instances of XmlAdapter
s.
This class implements ErrorHandler
and propages erros to this object
as the ValidationEventHandler
, which will be implemented in a derived class.
Field Summary | |
---|---|
static boolean |
debugTableNPE
|
Exception |
guyWhoSetTheTableToNull
When we set table to null, record who did it. |
Constructor Summary | |
---|---|
Coordinator()
|
Method Summary | ||
---|---|---|
static Coordinator |
_getInstance()
|
|
|
containsAdapter(Class<T> type)
|
|
void |
error(SAXParseException exception)
|
|
void |
fatalError(SAXParseException exception)
|
|
|
getAdapter(Class<T> key)
Gets the instance of the adapter. |
|
protected abstract ValidationEventLocator |
getLocation()
Gets the current location. |
|
protected void |
popCoordinator()
Called whenever an execution flow exits the realm of this Coordinator . |
|
protected void |
pushCoordinator()
Called whenever an execution flow enters the realm of this Coordinator . |
|
XmlAdapter |
putAdapter(Class<? extends XmlAdapter> c,
XmlAdapter a)
|
|
protected void |
resetThreadAffinity()
Dis-associate this Coordinator with the current thread. |
|
protected void |
setThreadAffinity()
Associates this Coordinator with the current thread. |
|
void |
warning(SAXParseException exception)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.xml.bind.ValidationEventHandler |
---|
handleEvent |
Field Detail |
---|
public Exception guyWhoSetTheTableToNull
table
to null, record who did it.
This is for trouble-shooting a possible concurrency issue reported at:
http://forums.java.net/jive/thread.jspa?threadID=15132
public static boolean debugTableNPE
Constructor Detail |
---|
public Coordinator()
Method Detail |
---|
public final XmlAdapter putAdapter(Class<? extends XmlAdapter> c, XmlAdapter a)
public final <T extends XmlAdapter> T getAdapter(Class<T> key)
public <T extends XmlAdapter> boolean containsAdapter(Class<T> type)
protected final void setThreadAffinity()
Coordinator
with the current thread.
Should be called at the very beginning of the episode.
protected final void resetThreadAffinity()
Coordinator
with the current thread.
Sohuld be called at the end of the episode to avoid memory leak.
protected final void pushCoordinator()
Coordinator
.
protected final void popCoordinator()
Coordinator
.
public static Coordinator _getInstance()
protected abstract ValidationEventLocator getLocation()
public final void error(SAXParseException exception) throws SAXException
error
in interface ErrorHandler
SAXException
public final void warning(SAXParseException exception) throws SAXException
warning
in interface ErrorHandler
SAXException
public final void fatalError(SAXParseException exception) throws SAXException
fatalError
in interface ErrorHandler
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |