net.rubygrapefruit.platform
Interface Terminals

All Superinterfaces:
NativeIntegration
All Known Implementing Classes:
AbstractTerminals, TerminfoTerminals, WindowsTerminals

public interface Terminals
extends NativeIntegration

Provides access to the terminal/console.

On UNIX based platforms, this provides access to the terminal. On Windows platforms, this provides access to the console.


Nested Class Summary
static class Terminals.Output
          System outputs.
 
Method Summary
 Terminal getTerminal(Terminals.Output output)
          Returns the terminal attached to the given output.
 boolean isTerminal(Terminals.Output output)
          Returns true if the given output is attached to a terminal.
 

Method Detail

isTerminal

boolean isTerminal(Terminals.Output output)
                   throws NativeException
Returns true if the given output is attached to a terminal.

Throws:
NativeException - On failure.

getTerminal

Terminal getTerminal(Terminals.Output output)
                     throws NativeException
Returns the terminal attached to the given output.

Returns:
The terminal. Never returns null.
Throws:
NativeException - When the output is not attached to a terminal.