GXPARSE hosted by SourceForge.net Logo

ca.gorman.xml.parse.toolkit
Class CoroutineEntity<T extends Parser>

java.lang.Object
  extended by ca.gorman.xml.parse.toolkit.AbstractEntity
      extended by ca.gorman.xml.parse.toolkit.CoroutineEntity<T>
All Implemented Interfaces:
CurrentEntity, Entity, Runnable

public class CoroutineEntity<T extends Parser>
extends AbstractEntity
implements CurrentEntity, Runnable

Invokes entity handler from the parser thread to run in the application thread.


Constructor Summary
CoroutineEntity(String name)
           Constructor.
 
Method Summary
 void parseContent()
           Parse the content of an entity (required even if there is no content).
 void run()
           Pop an element from the entity stack and allow its entity handler to return from the application thread to the parser thread.
 
Methods inherited from class ca.gorman.xml.parse.toolkit.AbstractEntity
equals, getName, hashCode, newInstance, setName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ca.gorman.xml.parse.Entity
equals, getName, hashCode
 

Constructor Detail

CoroutineEntity

public CoroutineEntity(String name)

Constructor.

Parameters:
name - entity name, not null
Throws:
NullPointerException - if name is null
Method Detail

run

public final void run()

Pop an element from the entity stack and allow its entity handler to return from the application thread to the parser thread.

Specified by:
run in interface Runnable

parseContent

public final void parseContent()
                        throws ListenerException,
                               IOException
Description copied from interface: CurrentEntity

Parse the content of an entity (required even if there is no content).

This method causes the parser to continue operation, and does not return until the end of the entity is reached.

Specified by:
parseContent in interface CurrentEntity
Throws:
ListenerException
IOException

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License