com.metamatrix.connector.text
Class TextSynchExecution

java.lang.Object
  extended by org.teiid.connector.basic.BasicExecution
      extended by com.metamatrix.connector.text.TextSynchExecution
All Implemented Interfaces:
Execution, ResultSetExecution

public class TextSynchExecution
extends BasicExecution
implements ResultSetExecution

The essential part that executes the query. It keeps all the execution states.


Constructor Summary
TextSynchExecution(IQuery query, Connection txtConn, RuntimeMetadata metadata)
          Constructor.
 
Method Summary
 void cancel()
          Cancels the execution abnormally.
 void close()
          Terminates the execution normally.
 void execute()
          Execute the associated command.
 java.util.List next()
           
protected  java.lang.Object submitRequest(java.lang.Object req)
          Submit request and get back the metadata necessary for accessing the text file.
protected  java.lang.Object translateRequest(ICommand request)
          Translate command.
protected  void translateResults(java.lang.Object response, ICommand cmd)
          Translate results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSynchExecution

public TextSynchExecution(IQuery query,
                          Connection txtConn,
                          RuntimeMetadata metadata)
Constructor.

Parameters:
cmd -
txtConn -
Method Detail

execute

public void execute()
             throws ConnectorException
Description copied from interface: Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.

Specified by:
execute in interface Execution
Throws:
ConnectorException

next

public java.util.List next()
                    throws ConnectorException,
                           DataNotAvailableException
Specified by:
next in interface ResultSetExecution
Throws:
ConnectorException
DataNotAvailableException

close

public void close()
Description copied from interface: Execution
Terminates the execution normally.

Specified by:
close in interface Execution

cancel

public void cancel()
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

translateRequest

protected java.lang.Object translateRequest(ICommand request)
                                     throws ConnectorException
Translate command.

Parameters:
request - ICommand as request
Returns:
Object translated request
Throws:
ConnectorException - if error occurs

submitRequest

protected java.lang.Object submitRequest(java.lang.Object req)
Submit request and get back the metadata necessary for accessing the text file.

Parameters:
req -
Returns:
Object

translateResults

protected void translateResults(java.lang.Object response,
                                ICommand cmd)
                         throws ConnectorException,
                                ConnectorException
Translate results.

Parameters:
response -
cmd -
Throws:
ConnectorException
ConnectorException


Copyright © 2009. All Rights Reserved.