org.ow2.petals.bc.sql.listener
Class OutStreamer

java.lang.Object
  extended by org.ow2.petals.bc.sql.listener.OutStreamer
All Implemented Interfaces:
java.lang.Runnable

public class OutStreamer
extends java.lang.Object
implements java.lang.Runnable

The SQL Response is written in a PipeStream an thread while the response of is sent by the JBIListener thread.

Author:
alouis

Constructor Summary
OutStreamer(SQLService sqlService, java.util.List<SQLParameter> sqlParameters, java.sql.Connection connection, java.util.logging.Logger logger, boolean isXMLResult)
          A Thread used to push resultSet data into a Pipe Stream after the SqlComponent returns the response
OutStreamer(SQLService sqlService, java.sql.ResultSet resultSet, boolean showMetadata, java.sql.Connection connection, java.util.logging.Logger logger)
          A Thread used to push resultSet data into a Pipe Stream after the SqlComponent returns the response
 
Method Summary
 java.io.PipedInputStream getPipedInputStream()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutStreamer

public OutStreamer(SQLService sqlService,
                   java.sql.ResultSet resultSet,
                   boolean showMetadata,
                   java.sql.Connection connection,
                   java.util.logging.Logger logger)
            throws java.io.IOException
A Thread used to push resultSet data into a Pipe Stream after the SqlComponent returns the response

Parameters:
sqlService -
resultSet - resultSet to transform into an XML doc
showMetadata - row index, column name and type written as xml attributes
connection - this connection is closed when all the resultSet has been written
logger -
Throws:
java.io.IOException

OutStreamer

public OutStreamer(SQLService sqlService,
                   java.util.List<SQLParameter> sqlParameters,
                   java.sql.Connection connection,
                   java.util.logging.Logger logger,
                   boolean isXMLResult)
            throws java.io.IOException
A Thread used to push resultSet data into a Pipe Stream after the SqlComponent returns the response

Parameters:
sqlService -
sqlParameters - SQL parameters to transform into an XML doc
connection - this connection is closed when all the resultSet has been written
logger -
Throws:
java.io.IOException
Method Detail

getPipedInputStream

public java.io.PipedInputStream getPipedInputStream()

run

public void run()
Specified by:
run in interface java.lang.Runnable


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.