public final class GlpkTerminal extends Object
GLPK will call method callback before producing
terminal output. A listener can inhibit the terminal output by returning
false in the output
routine.
The list of listeners is thread local. Each thread has to register its own listener.
If a GlpkExeption has occured it is necessary to
call
GLPK.glp_term_hook(null, null);to reenable listening to terminal output.
| Modifier and Type | Method and Description |
|---|---|
static void |
addListener(GlpkTerminalListener listener)
Add listener.
|
static int |
callback(String str)
Callback function called by native library.
|
static void |
removeAllListeners()
Remove all listeners.get().
|
static boolean |
removeListener(GlpkTerminalListener listener)
Removes first occurance of listener.
|
public static int callback(String str)
str - string to be written to consolepublic static void addListener(GlpkTerminalListener listener)
listener - listener for terminal outputpublic static boolean removeListener(GlpkTerminalListener listener)
listener - listener for terminal outputpublic static void removeAllListeners()
This documentation is part of project GLPK for Java.
| Group-ID | org.gnu.glpk |
| Artifact-ID | glpk-java |
| Version | 1.12.0 |