KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ziclix > python > sql > pipe > Source


1 /*
2  * Jython Database Specification API 2.0
3  *
4  * $Id: Source.java,v 1.2 2005/02/23 04:26:19 bzimmer Exp $
5  *
6  * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
7  *
8  */

9 package com.ziclix.python.sql.pipe;
10
11 import org.python.core.PyObject;
12
13 /**
14  * A Source produces data to be consumed by a Sink. The data can be generated
15  * from anywhere, but must follow the format detail in next().
16  *
17  * @author brian zimmer
18  * @version $Revision: 1.2 $
19  * @see #next
20  * @see Sink
21  */

22 public interface Source {
23
24     /**
25      * Invoked at the start of processing.
26      */

27     public void start();
28
29     /**
30      * Return the next row from the source.
31      * The following format:<br>
32      * &nbsp;&nbsp;[(colName, colType), (colName, colType), ...]
33      * for headers and:<br/>
34      * &nbsp;&nbsp;[(col), (colName, colType), ...]
35      * for all other data must be used.
36      */

37     public PyObject next();
38
39     /**
40      * Invoked at the end of processing. This method is guarenteed to be called.
41      */

42     public void end();
43 }
44
Popular Tags