GXPARSE hosted by SourceForge.net Logo

ca.gorman.util.scan
Interface AsynchronousScanState


public interface AsynchronousScanState

External view of the current state of an asynchronous Scanner.


Method Summary
 Exception getException()
           Get the exception that caused abnormal termination.
 Thread getThread()
           Get the thread in which the scanner is running.
 boolean isTerminated()
           False unil the scanner terminates.
 void requestTermination()
           Request the scanner to stop scanning.
 void waitForTermination()
           Wait indefinitely for the Scanner to terminate.
 void waitForTermination(long timeout)
           Wait a specified interval (indefinitely if the interval is zero) for the Scanner to terminate.
 

Method Detail

isTerminated

boolean isTerminated()

False unil the scanner terminates.


getException

Exception getException()

Get the exception that caused abnormal termination.

Null while scanner is running, remains null after a normal termination.


getThread

Thread getThread()

Get the thread in which the scanner is running.


requestTermination

void requestTermination()

Request the scanner to stop scanning.

Scanner will finish processing any input that has been matched. Unmatched input will not be processed.


waitForTermination

void waitForTermination()
                        throws InterruptedException

Wait indefinitely for the Scanner to terminate.

Throws:
InterruptedException - - if the scanner thread is interrupted before this method returns.

waitForTermination

void waitForTermination(long timeout)
                        throws InterruptedException

Wait a specified interval (indefinitely if the interval is zero) for the Scanner to terminate.

Parameters:
timeout - the approximate number of milliseconds to wait, zero represents an infinite wait
Throws:
IllegalArgumentException - - if timeout is negative.
InterruptedException - - if the scanner thread is interrupted before this method returns.

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