com.sun.xml.bind.v2.runtime
public abstract class Coordinator extends Object implements ErrorHandler, ValidationEventHandler
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 XmlAdapters.
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.
|
| Method Summary | |
|---|---|
| <T extends XmlAdapter> boolean | containsAdapter(Class<T> type) |
| void | error(SAXParseException exception) |
| void | fatalError(SAXParseException exception) |
| <T extends XmlAdapter> T | 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) |
| static Coordinator | _getInstance() |
Returns: always non-null.