src.com.ziclix.python.sql.pipe.Sink Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython Show documentation
Show all versions of jython Show documentation
Jython is an implementation of the high-level, dynamic, object-oriented
language Python written in 100% Pure Java, and seamlessly integrated with
the Java platform. It thus allows you to run Python on any Java platform.
/*
* Jython Database Specification API 2.0
*
*
* Copyright (c) 2001 brian zimmer
*
*/
package com.ziclix.python.sql.pipe;
import org.python.core.PyObject;
/**
* A Sink acts as a data consumer. The Pipe is responsible for pushing data
* to the Sink as generated by the Source.
*
* @author brian zimmer
*/
public interface Sink {
/**
* Invoked at the start of the data pipelining session.
*/
public void start();
/**
* Invoked for each row of data. In general, the first row of data will
* consist of header information in the format:
* [(colName, colType), ...]
* and in the format:
* (colData, colData, ...)
* for all other data.
*/
public void row(PyObject row);
/**
* Invoked at the end of the data pipelining session. This is useful for
* flushing any buffers or handling any cleanup. This method is guaranteed
* to be called.
*/
public void end();
}