|
||||||||||
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.
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)
|
|
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 |
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 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 |