GXPARSE hosted by SourceForge.net Logo

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

java.lang.Object
  extended by ca.gorman.xml.parse.toolkit.Coroutine_NoCallback<T>
      extended by ca.gorman.xml.parse.toolkit.CoroutineStartPrefixMapping<T>
All Implemented Interfaces:
Runnable

public final class CoroutineStartPrefixMapping<T extends Parser>
extends Coroutine_NoCallback<T>
implements Runnable

Invokes start prefix mapping handler from the parser thread to run in the application thread (still under development, design may change).


Constructor Summary
  CoroutineStartPrefixMapping()
           Construct instance that cannot be used until initialized by setListener and setParams.
protected CoroutineStartPrefixMapping(Listener<T> listener)
           Construct instance that cannot be used until initialized by setParams.
protected CoroutineStartPrefixMapping(Listener<T> listener, String prefix, String uri)
           Construct fully initialized instance, ready for immediate use.
 
Method Summary
 Listener<T> getListener()
           Get the listener.
 void run()
           Execute a callback from the parser thread to run the start prefix handler in the application thread.
 void setListener(Listener<T> listener)
           Set or reset the listener.
 void setParams(String prefix, String uri)
           Set or reset data to be sent to the start prefix handler.
 
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

CoroutineStartPrefixMapping

public CoroutineStartPrefixMapping()

Construct instance that cannot be used until initialized by setListener and setParams.


CoroutineStartPrefixMapping

protected CoroutineStartPrefixMapping(Listener<T> listener)

Construct instance that cannot be used until initialized by setParams.

Throws:
NullPointerException - if listener is null

CoroutineStartPrefixMapping

protected CoroutineStartPrefixMapping(Listener<T> listener,
                                      String prefix,
                                      String uri)

Construct fully initialized instance, ready for immediate use.

Throws:
NullPointerException - if listener is null
Method Detail

setListener

public void setListener(Listener<T> listener)

Set or reset the listener.

Throws:
NullPointerException - if listener is null

getListener

public Listener<T> getListener()

Get the listener.


setParams

public void setParams(String prefix,
                      String uri)

Set or reset data to be sent to the start prefix handler.


run

public void run()

Execute a callback from the parser thread to run the start prefix handler in the application thread. The parser is suspended until this method returns.

Specified by:
run in interface Runnable
Throws:
CoroutineTransferException - if the start prefix handler} throws a checked exception.

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