-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathSource.java
More file actions
41 lines (36 loc) · 930 Bytes
/
Source.java
File metadata and controls
41 lines (36 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Jython Database Specification API 2.0
*
*
* Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
*
*/
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:<br>
* [(colName, colType), (colName, colType), ...]
* for headers and:<br>
* [(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();
}