Package org.teiid.translator.amazon.s3
Class S3ProcedureExecution
- java.lang.Object
-
- org.teiid.translator.amazon.s3.S3ProcedureExecution
-
- All Implemented Interfaces:
Execution
,ProcedureExecution
,ResultSetExecution
public class S3ProcedureExecution extends Object implements ProcedureExecution
-
-
Constructor Summary
Constructors Constructor Description S3ProcedureExecution(Call command, S3ExecutionFactory ef, RuntimeMetadata metadata, ExecutionContext ec, WSConnection conn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the execution abnormally.void
close()
Terminates the execution normally.protected String
determineEndpoint(String name, String bucket, String region)
void
execute()
Execute the associated command.List<?>
getOutputParameterValues()
Get the output parameter values.protected BinaryWSProcedureExecution
invokeHTTP(String method, String uri, Object payload, Map<String,String> headers)
List<?>
next()
Retrieves the next row of the resultset.
-
-
-
Constructor Detail
-
S3ProcedureExecution
public S3ProcedureExecution(Call command, S3ExecutionFactory ef, RuntimeMetadata metadata, ExecutionContext ec, WSConnection conn)
-
-
Method Detail
-
execute
public void execute() throws TranslatorException
Description copied from interface:Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
execute
in interfaceExecution
- Throws:
TranslatorException
-
determineEndpoint
protected String determineEndpoint(String name, String bucket, String region) throws TranslatorException
- Throws:
TranslatorException
-
invokeHTTP
protected BinaryWSProcedureExecution invokeHTTP(String method, String uri, Object payload, Map<String,String> headers) throws TranslatorException
- Throws:
TranslatorException
-
close
public void close()
Description copied from interface:Execution
Terminates the execution normally.
-
cancel
public void cancel() throws TranslatorException
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 interfaceExecution
- Throws:
TranslatorException
-
next
public List<?> next() throws TranslatorException, DataNotAvailableException
Description copied from interface:ResultSetExecution
Retrieves the next row of the resultset.- Specified by:
next
in interfaceResultSetExecution
- Returns:
- the next row or null indicating that there are no more results
- Throws:
TranslatorException
DataNotAvailableException
-
getOutputParameterValues
public List<?> getOutputParameterValues() throws TranslatorException
Description copied from interface:ProcedureExecution
Get the output parameter values. Results should place the return parameter first if it is present, then the IN/OUT and OUT parameters should follow in the order they appeared in the command.- Specified by:
getOutputParameterValues
in interfaceProcedureExecution
- Throws:
TranslatorException
- If an error occurs while retrieving the output value
-
-