File: REngineInputInterface.java

package info (click to toggle)
rjava 1.0-14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,188 kB
  • sloc: java: 13,223; ansic: 5,503; sh: 3,776; xml: 325; makefile: 250; perl: 33
file content (13 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
package org.rosuda.REngine;

/** interface defining delegate methods used by {@link REngine} to forward input callbacks from R. */
public interface REngineInputInterface {
	/** called when R enters the read stage of the event loop.
	 *  <p> Important: implementations should never use a direct return! That will cause a tigh-spinning event loop. Implementation must wait for input asynchronously (e.g., declare synchonized RReadConsole and use wait()) and return only when a complete line is available for processing.
	 *  @param eng calling engine
	 *  @param prompt prompt to display in the console
	 *  @param addToHistory flag indicating whether the input is transient (<code>false</code>) or to be recorded in the command history (<code>true</code>).
	 *  @return string to be processed as console input
	 */
	public String RReadConsole(REngine eng, String prompt, int addToHistory);
}