APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.internal.org.jline.terminal.impl

public Class PosixPtyTerminal

extends AbstractPosixTerminal
Class Inheritance
Imports
java.io.IOException, .InputStream, .OutputStream, .OutputStreamWriter, .PrintWriter, java.nio.charset.Charset, java.util.Objects, jdk.internal.org.jline.terminal.spi.Pty, jdk.internal.org.jline.utils.ClosedException, .NonBlocking, .NonBlockingInputStream, .NonBlockingReader

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final InputStream
private final NonBlockingInputStream
private Thread
private final Object
private final InputStream
private final OutputStream
private final OutputStream
private final OutputStream
private Thread
private boolean
private final NonBlockingReader
private final PrintWriter
Inherited from jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal:
originalAttributespty

Constructor Summary

AccessConstructor and Description
public
PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding)

public
PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding, Terminal.SignalHandler signalHandler)

public
PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding, Terminal.SignalHandler signalHandler, boolean paused)

Method Summary

Modifier and TypeMethod and Description
public boolean
protected void
public InputStream
input()

Implements jdk.internal.org.jline.terminal.Terminal.input.

Retrieve the input stream for this terminal.

public OutputStream
output()

Implements jdk.internal.org.jline.terminal.Terminal.output.

Retrieve the output stream for this terminal.

public void
public void
pause(boolean wait)

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.pause.

Implements jdk.internal.org.jline.terminal.Terminal.pause.

Stop reading the input stream and optionally wait for the underlying threads to finish.

public boolean
paused()

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.paused.

Implements jdk.internal.org.jline.terminal.Terminal.paused.

Check whether the terminal is currently reading the input stream or not.

private void
private void
public NonBlockingReader
reader()

Implements jdk.internal.org.jline.terminal.Terminal.reader.

Retrieve the Reader for this terminal.

public void
public PrintWriter
writer()

Implements jdk.internal.org.jline.terminal.Terminal.writer.

Retrieve the Writer for this terminal.

Inherited from jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal:
getAttributesgetCursorPositiongetProvidergetPtygetSizegetSystemStreamsetAttributessetSizetoString

Field Detail

inback to summary
private final InputStream in
inputback to summary
private final NonBlockingInputStream input
inputPumpThreadback to summary
private Thread inputPumpThread
lockback to summary
private final Object lock
masterInputback to summary
private final InputStream masterInput
masterOutputback to summary
private final OutputStream masterOutput
outback to summary
private final OutputStream out
outputback to summary
private final OutputStream output
outputPumpThreadback to summary
private Thread outputPumpThread
pausedback to summary
private boolean paused
readerback to summary
private final NonBlockingReader reader
writerback to summary
private final PrintWriter writer

Constructor Detail

PosixPtyTerminalback to summary
public PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding) throws IOException
PosixPtyTerminalback to summary
public PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding, Terminal.SignalHandler signalHandler) throws IOException
PosixPtyTerminalback to summary
public PosixPtyTerminal(String name, String type, Pty pty, InputStream in, OutputStream out, Charset encoding, Terminal.SignalHandler signalHandler, boolean paused) throws IOException
Annotations
@SuppressWarnings:this-escape

Method Detail

canPauseResumeback to summary
public boolean canPauseResume()

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.canPauseResume.

Implements jdk.internal.org.jline.terminal.Terminal.canPauseResume.

Doc from jdk.internal.org.jline.terminal.Terminal.canPauseResume.

Whether this terminal supports pause() and resume() calls.

Annotations
@Override
doCloseback to summary
protected void doClose() throws IOException

Overrides jdk.internal.org.jline.terminal.impl.AbstractPosixTerminal.doClose.

Annotations
@Override
inputback to summary
public InputStream input()

Implements jdk.internal.org.jline.terminal.Terminal.input.

Doc from jdk.internal.org.jline.terminal.Terminal.input.

Retrieve the input stream for this terminal. In some rare cases, there may be a need to access the terminal input stream directly. In the usual cases, use the reader() instead.

outputback to summary
public OutputStream output()

Implements jdk.internal.org.jline.terminal.Terminal.output.

Doc from jdk.internal.org.jline.terminal.Terminal.output.

Retrieve the output stream for this terminal. In some rare cases, there may be a need to access the terminal output stream directly. In the usual cases, use the writer() instead.

pauseback to summary
public void pause()

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.pause.

Implements jdk.internal.org.jline.terminal.Terminal.pause.

Doc from jdk.internal.org.jline.terminal.Terminal.pause.

Stop reading the input stream.

Annotations
@Override
pauseback to summary
public void pause(boolean wait) throws InterruptedException

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.pause.

Implements jdk.internal.org.jline.terminal.Terminal.pause.

Doc from jdk.internal.org.jline.terminal.Terminal.pause.

Stop reading the input stream and optionally wait for the underlying threads to finish.

Annotations
@Override
Exceptions
InterruptedException:
if the call has been interrupted
pausedback to summary
public boolean paused()

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.paused.

Implements jdk.internal.org.jline.terminal.Terminal.paused.

Doc from jdk.internal.org.jline.terminal.Terminal.paused.

Check whether the terminal is currently reading the input stream or not. In order to process signal as quickly as possible, the terminal need to read the input stream and buffer it internally so that it can detect specific characters in the input stream (Ctrl+C, Ctrl+D, etc...) and raise the appropriate signals. However, there are some cases where this processing should be disabled, for example when handing the terminal control to a subprocess.

Annotations
@Override
pumpInback to summary
private void pumpIn()
pumpOutback to summary
private void pumpOut()
readerback to summary
public NonBlockingReader reader()

Implements jdk.internal.org.jline.terminal.Terminal.reader.

Doc from jdk.internal.org.jline.terminal.Terminal.reader.

Retrieve the Reader for this terminal. This is the standard way to read input from this terminal. The reader is non blocking.

resumeback to summary
public void resume()

Overrides jdk.internal.org.jline.terminal.impl.AbstractTerminal.resume.

Implements jdk.internal.org.jline.terminal.Terminal.resume.

Doc from jdk.internal.org.jline.terminal.Terminal.resume.

Resume reading the input stream.

Annotations
@Override
writerback to summary
public PrintWriter writer()

Implements jdk.internal.org.jline.terminal.Terminal.writer.

Doc from jdk.internal.org.jline.terminal.Terminal.writer.

Retrieve the Writer for this terminal. This is the standard way to write to this terminal.

jdk.internal.org.jline.terminal.impl back to summary

private Class PosixPtyTerminal.InputStreamWrapper

extends NonBlockingInputStream
Class Inheritance

Field Summary

Modifier and TypeField and Description
private volatile boolean
private final NonBlockingInputStream
Inherited from jdk.internal.org.jline.utils.NonBlockingInputStream:
EOFREAD_EXPIRED

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.InputStream.close.

Implements java.io.Closeable.close.

Closes this input stream and releases any system resources associated with the stream.

public int
read(long timeout, boolean isPeek)

Implements abstract jdk.internal.org.jline.utils.NonBlockingInputStream.read.

Inherited from jdk.internal.org.jline.utils.NonBlockingInputStream:
peekreadreadreadreadBufferedreadBufferedreadBufferedshutdown

Field Detail

closedback to summary
private volatile boolean closed
inback to summary
private final NonBlockingInputStream in

Constructor Detail

InputStreamWrapperback to summary
protected InputStreamWrapper(NonBlockingInputStream in)

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.InputStream.close.

Implements java.io.Closeable.close.

Doc from java.io.InputStream.close.

Closes this input stream and releases any system resources associated with the stream.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
readback to summary
public int read(long timeout, boolean isPeek) throws IOException

Implements abstract jdk.internal.org.jline.utils.NonBlockingInputStream.read.

Annotations
@Override