@InterfaceAudience.Private public class KeyPressGenerator extends Object
KeyPress
objects from the given input stream and offers them to the
given queue.Modifier and Type | Class and Description |
---|---|
private static class |
KeyPressGenerator.ParseState |
Modifier and Type | Field and Description |
---|---|
private ExecutorService |
executorService |
private Reader |
input |
private BlockingQueue<Character> |
inputCharacterQueue |
private InputStream |
inputStream |
private Queue<KeyPress> |
keyPressQueue |
private static org.slf4j.Logger |
LOGGER |
private int |
param1 |
private int |
param2 |
private KeyPressGenerator.ParseState |
parseState |
private AtomicBoolean |
stopThreads |
Constructor and Description |
---|
KeyPressGenerator(InputStream inputStream,
Queue<KeyPress> keyPressQueue) |
Modifier and Type | Method and Description |
---|---|
private void |
ctrlAltAndCharacter(char ch) |
private void |
ctrlAndCharacter(char ch) |
private void |
doneEscapeSequenceCharacter(char last) |
private void |
escapeSequenceCharacter(char ch) |
private void |
generatorThread() |
private void |
initState() |
private boolean |
isAlt(int param) |
private boolean |
isCtrl(int param) |
private boolean |
isPrintableChar(char ch) |
private boolean |
isShift(int param) |
private void |
offer(KeyPress keyPress) |
private void |
readerThread() |
void |
start() |
void |
stop() |
private static final org.slf4j.Logger LOGGER
private final Queue<KeyPress> keyPressQueue
private final BlockingQueue<Character> inputCharacterQueue
private final InputStream inputStream
private final AtomicBoolean stopThreads
private final ExecutorService executorService
private KeyPressGenerator.ParseState parseState
private int param1
private int param2
public KeyPressGenerator(InputStream inputStream, Queue<KeyPress> keyPressQueue)
public void start()
private void initState()
private void readerThread()
private void generatorThread()
private void ctrlAndCharacter(char ch)
private boolean isPrintableChar(char ch)
private void ctrlAltAndCharacter(char ch)
private void escapeSequenceCharacter(char ch)
private void doneEscapeSequenceCharacter(char last)
private boolean isShift(int param)
private boolean isAlt(int param)
private boolean isCtrl(int param)
public void stop()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.