com.metamatrix.connector.xml.streaming
Class BaseStreamingExecution
java.lang.Object
com.metamatrix.connector.xml.streaming.BaseStreamingExecution
- All Implemented Interfaces:
- XMLExecution, Execution, ResultSetExecution
- Direct Known Subclasses:
- FileExecution, HTTPExecution
public abstract class BaseStreamingExecution
- extends java.lang.Object
- implements XMLExecution
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xpaths
protected java.util.List<java.lang.String> xpaths
rowProducer
protected StreamingResultsProducer rowProducer
results
protected java.util.List<java.lang.Object[]> results
resultProducers
protected java.util.List<ResultProducer> resultProducers
exeInfo
protected ExecutionInfo exeInfo
query
protected IQuery query
metadata
protected RuntimeMetadata metadata
exeContext
protected ExecutionContext exeContext
connEnv
protected ConnectorEnvironment connEnv
connection
protected XMLConnectionImpl connection
logger
protected ConnectorLogger logger
BaseStreamingExecution
public BaseStreamingExecution(IQuery command,
XMLConnectionImpl conn,
RuntimeMetadata rtMetadata,
ExecutionContext context,
ConnectorEnvironment env)
cancel
public void cancel()
throws ConnectorException
- Description copied from interface:
Execution
- Cancels the execution abnormally. This will happen via
a different thread from the one performing the execution, so
should be expected to happen in a multi-threaded scenario.
- Specified by:
cancel
in interface Execution
- Throws:
ConnectorException
close
public void close()
throws ConnectorException
- Description copied from interface:
Execution
- Terminates the execution normally.
- Specified by:
close
in interface Execution
- Throws:
ConnectorException
next
public java.util.List next()
throws ConnectorException,
DataNotAvailableException
- Earlier implementations retrieved the XML in the execute method. Because this can be any
number of documents of any size, this caused memory problems because the xml was
completely realized in memory. In this impl the setup work is done in execute and
the xml is streamed in the next function.
- Specified by:
next
in interface ResultSetExecution
- Throws:
ConnectorException
DataNotAvailableException
getExeContext
public ExecutionContext getExeContext()
- Specified by:
getExeContext
in interface XMLExecution
getConnection
public XMLConnection getConnection()
- Specified by:
getConnection
in interface XMLExecution
Copyright © 2009. All Rights Reserved.