|
GXPARSE hosted by |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.gorman.xml.parse.toolkit.Coroutine_NoCallback<T>
ca.gorman.xml.parse.toolkit.Coroutine_Callback<T>
ca.gorman.xml.parse.toolkit.CoroutineDocument<T>
public final class CoroutineDocument<T extends Parser>
Invokes
document handler
from
the parser thread to run in the application thread.
Constructor Summary | |
---|---|
CoroutineDocument()
Construct instance that cannot be used until initialized by setCoroutine
setListener |
|
CoroutineDocument(Coroutine coroutine)
Construct instance that cannot be used until initialized by setListener |
|
CoroutineDocument(Coroutine coroutine,
Listener<T> listener)
Construct fully initialized instance, ready for immediate use. |
Method Summary | |
---|---|
Listener<T> |
getListener()
Get the listener . |
void |
parseContent()
Parse the content of a Document . |
void |
run()
Execute a callback from the parser thread to run the document handler
in the application thread. |
void |
setListener(Listener<T> listener)
Set or reset the listener . |
Methods inherited from class ca.gorman.xml.parse.toolkit.Coroutine_Callback |
---|
getCoroutine, setCoroutine |
Methods inherited from class ca.gorman.xml.parse.toolkit.Coroutine_NoCallback |
---|
getParser, setParser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoroutineDocument()
Construct instance that cannot be used until initialized by
setCoroutine
setListener
public CoroutineDocument(Coroutine coroutine)
Construct instance that cannot be used until initialized by
setListener
NullPointerException
- if coroutine is nullpublic CoroutineDocument(Coroutine coroutine, Listener<T> listener)
Construct fully initialized instance, ready for immediate use.
NullPointerException
- if coroutine or listener is nullMethod Detail |
---|
public void setListener(Listener<T> listener)
Set or reset the listener
.
NullPointerException
- if listener is nullpublic Listener<T> getListener()
Get the listener
.
public void run()
Execute a callback from the parser thread to run the
document handler
in the application thread.
This method is invoked just before the parser starts parsing the actual
document, and runs until the parser reaches the end of the document.
The parser is suspended until the
document handler
invokes the parseContent
method.
run
in interface Runnable
CoroutineTransferException
- if the
document handler
throws an exception.public final void parseContent() throws ListenerException, IOException
CurrentDocument
Parse the content of a Document
.
This method causes the parser to continue operation, and does not
return until the end of the document is reached. No part of the
Document
has been parsed before this method is invoked.
parseContent
in interface CurrentDocument
ListenerException
IOException
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |