1 package org.gnu.glpk; 2 3 /** 4 * Terminal Listener 5 * <p>GLPK will call method {@link GlpkTerminal#callback(String) 6 * GlpkTerminal.output} before producing terminal output. A listener can 7 * inhibit the terminal output by returning <code>false</code> in the 8 * {@link #output(String) output} routine. 9 * <p>If a {@link GlpkException GlpkExeption} has occured it is necessary to 10 * call<pre> 11 * GLPK.glp_term_hook(null, null);</pre> 12 * to reenable listening to terminal output. 13 * @see GlpkTerminal 14 * @see GlpkException 15 * @see GLPK#glp_term_hook(SWIGTYPE_p_f_p_void_p_q_const__char__int, 16 * SWIGTYPE_p_void) 17 */ 18 public interface GlpkTerminalListener { 19 /** 20 * Receive terminal output. 21 * <p>The return value controls, if the mesage is displayed in the 22 * console. 23 * @param str output string 24 * @return true if terminal output is requested 25 */ 26 boolean output(String str); 27 }