src.com.ziclix.python.sql.pipe.Source Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jython-standalone Show documentation
Show all versions of jython-standalone 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 Source produces data to be consumed by a Sink. The data can be generated
* from anywhere, but must follow the format detail in next().
*
* @author brian zimmer
* @see #next
* @see Sink
*/
public interface Source {
/**
* Invoked at the start of processing.
*/
public void start();
/**
* Return the next row from the source.
* The following format:
* [(colName, colType), (colName, colType), ...]
* for headers and:
* [(col), (colName, colType), ...]
* for all other data must be used.
*/
public PyObject next();
/**
* Invoked at the end of processing. This method is guarenteed to be called.
*/
public void end();
}