org.geotools.xml.transform
Class TransformerBase.Task

java.lang.Object
  extended byorg.geotools.xml.transform.TransformerBase.Task
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
TransformerBase

public class TransformerBase.Task
extends java.lang.Object
implements java.lang.Runnable

A wrapper for a Transformation Task. Support aborting any translation activity. Because the Task is Runnable, exceptions must be checked asynchronously by using the checkError and getError methods.


Constructor Summary
TransformerBase.Task(java.lang.Object object, javax.xml.transform.stream.StreamResult result)
           
 
Method Summary
 void abort()
          Calls to the underlying translator to abort any calls to translation.
 boolean checkError()
          Did an error occur?
 java.lang.Exception getError()
          Get any error which occurred.
 void run()
          Perform the translation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformerBase.Task

public TransformerBase.Task(java.lang.Object object,
                            javax.xml.transform.stream.StreamResult result)
                     throws javax.xml.transform.TransformerException
Method Detail

checkError

public boolean checkError()
Did an error occur?

Returns:
true if one did, false otherwise.

getError

public java.lang.Exception getError()
Get any error which occurred.

Returns:
An Exception if checkError returns true, null otherwise.

abort

public void abort()
Calls to the underlying translator to abort any calls to translation. Should return silently regardless of outcome.


run

public void run()
Perform the translation. Exceptions are captured and can be obtained through the checkError and getError methods.

Specified by:
run in interface java.lang.Runnable


Copyright © GeoTools. All Rights Reserved.