public class TerminalEvent
extends java.util.EventObject
A screen handler that receives this event can set the event 'handled' to notify other screen handlers that the event is being processed. Screen handlers should check whether the event is being handled before attempting to drive the terminal, set fields on the screen etc.
Modifier and Type | Field and Description |
---|---|
static int |
EXIT_SCREEN_REQUEST
The terminal requests the screen handler to exit this screen.
|
static int |
NO_REQUEST
No terminal request.
|
Constructor and Description |
---|
TerminalEvent(java.lang.Object s,
TerminalSession t)
Construct a terminal event.
|
TerminalEvent(java.lang.Object s,
TerminalSession t,
java.lang.Exception e)
Construct a terminal exception event.
|
TerminalEvent(java.lang.Object s,
TerminalSession t,
int id)
Construct a terminal event.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Exception |
getException()
Returns the exception associated with this event.
|
TerminalSession |
getTerminal()
Returns the terminal associated with this event.
|
int |
getTerminalRequest()
Returns the terminal request ID.
|
boolean |
isHandled()
Returns true if the event is already being handled by another listener.
|
void |
setHandled()
Set the event to be handled.
|
public static final int EXIT_SCREEN_REQUEST
public static final int NO_REQUEST
public TerminalEvent(java.lang.Object s, TerminalSession t)
s
- the source of the eventt
- the terminalpublic TerminalEvent(java.lang.Object s, TerminalSession t, int id)
s
- the source of the eventt
- the terminalid
- the terminal request identifierpublic TerminalEvent(java.lang.Object s, TerminalSession t, java.lang.Exception e)
s
- the source of the eventt
- the terminale
- the exceptionpublic TerminalSession getTerminal()
public void setHandled()
public boolean isHandled()
public java.lang.Exception getException()
public int getTerminalRequest()