01: /*
02: * Jython Database Specification API 2.0
03: *
04: * $Id: Source.java 2414 2005-02-23 04:26:23Z bzimmer $
05: *
06: * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
07: *
08: */
09: 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: 2414 $
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: * [(colName, colType), (colName, colType), ...]
33: * for headers and:<br/>
34: * [(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: }
|