|
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.CoroutineCdata<T>
public final class CoroutineCdata<T extends Parser>
Invokes CDATA marked section handler
from the parser thread to run in the
application thread.
Constructor Summary | |
---|---|
CoroutineCdata()
Construct instance that cannot be used until initialized by setCoroutine
setListener |
|
CoroutineCdata(Coroutine coroutine)
Construct instance that cannot be used until initialized by setListener |
|
CoroutineCdata(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 MarkedSection . |
void |
run()
Execute a callback from the parser thread to run the CDATA marked section
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 CoroutineCdata()
Construct instance that cannot be used until initialized by
setCoroutine
setListener
public CoroutineCdata(Coroutine coroutine)
Construct instance that cannot be used until initialized by
setListener
NullPointerException
- if coroutine is nullpublic CoroutineCdata(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
CDATA marked section
handler
in the application thread.
This method is invoked just before the parser starts parsing the CDATA
marked section, and runs until the parser reaches the end of the CDATA
marked section. The parser is suspended until the
CDATA marked section
handler
invokes the parseContent
method.
run
in interface Runnable
CoroutineTransferException
- if the
document
handler
throws a checked exception.public final void parseContent() throws ListenerException, IOException
CurrentMarkedSection
Parse the content of a MarkedSection
.
This method causes the parser to continue operation, and does not
return until the end of the marked section is reached. No part of the
MarkedSection
has been parsed before this method
is invoked.
parseContent
in interface CurrentMarkedSection
ListenerException
IOException
|
GXPARSE download | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |