public abstract class AbstractDriver<P extends OutputPrimitives,O extends OutputManager<P>> extends java.lang.Object implements ScreenDriver<O>
ScreenDriver.UriPathAnchor| Modifier and Type | Field and Description |
|---|---|
private boolean |
background
Background flag (signifies if the client is in the foreground session).
|
private boolean |
batch
Batch mode flag.
|
protected static java.lang.String |
BEEP_FILE_PATH
Path to the file containing error beep sound.
|
protected P |
direct
Direct to screen output primitives.
|
protected WidgetFactory<O> |
factory
This driver-specific widget factory
|
private boolean |
isChui
UI modality flag:
true for ChUI, false for GUI. |
private static CentralLogger |
LOG
Logger.
|
private java.lang.String |
term
Terminal type name.
|
| Constructor and Description |
|---|
AbstractDriver(WidgetFactory<O> factory,
P direct,
boolean isChui,
java.lang.String term)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
WidgetFactory<O> |
getFactory()
Get driver-specific widget factory.
|
long |
getHostByName(java.lang.String name)
Returns the currently connected client's machine name for session.
|
java.lang.String |
getHostName()
Returns the currently connected client's machine name for session.
|
P |
getPrimitives()
Get driver-specific direct output primitives implementation.
|
java.lang.String |
getWindowSystem()
Get the default WINDOW-SYSTEM used by this driver.
|
boolean |
inBackgroundMode()
Checks if the current driver is running in background mode.
|
boolean |
inBatchMode()
Checks if the current driver is running in batch mode.
|
void |
init()
Initialize driver.
|
boolean |
isChui()
Get screen interface type.
|
protected java.io.ByteArrayInputStream |
playBeep(java.io.ByteArrayInputStream beepAudioData)
Load and play beep sound.
|
protected void |
setBackgroundMode(boolean background)
Assigns the flag determining if the current driver is running in background mode.
|
protected void |
setBatchMode(boolean batch)
Assigns the flag determining if the current driver is running in batch mode.
|
void |
setTerminalType(java.lang.String term)
Change terminal type to specified one.
|
void |
shutdown()
Perform driver shutdown.
|
java.lang.String |
terminalType()
Obtain system/implementation specific terminal type string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeep, captureMouseEvents, chooseFiles, clear, clientReady, createOutputManager, deregisterWidget, getChildProcessFactory, getName, handleMouseEvent, isEmbeddedClient, isWeb, lockMousePointer, openMimeResource, openMimeResource, propagate, readKey, resetMode, resume, resume, setControl, setCurrentLanguage, setCursorStatus, suspend, suspend, updateClientMetrics, widgetStateChangedprotected static java.lang.String BEEP_FILE_PATH
private static final CentralLogger LOG
protected WidgetFactory<O extends OutputManager<P>> factory
protected P extends OutputPrimitives direct
private boolean isChui
true for ChUI, false for GUI.private boolean batch
private boolean background
private java.lang.String term
public AbstractDriver(WidgetFactory<O> factory, P direct, boolean isChui, java.lang.String term)
factory - The widget factory to use for this driver.direct - The output primitives.isChui - true for ChUI, false for GUI.term - Terminal type string.public boolean inBatchMode()
inBatchMode in interface ScreenDriver<O extends OutputManager<P>>false.public boolean inBackgroundMode()
inBackgroundMode in interface ScreenDriver<O extends OutputManager<P>>false.public java.lang.String terminalType()
At present this is used to implement 4GL TERMINAL function and do some terminal-specific workarounds. At present workarounds exist for "vt320" terminal type. If implementation requires no special workarounds, then it should avoid returning "vt320" as terminal type string.
terminalType in interface ScreenDriver<O extends OutputManager<P>>public void setTerminalType(java.lang.String term)
setTerminalType in interface ScreenDriver<O extends OutputManager<P>>term - The terminal type.public P getPrimitives()
getPrimitives in interface ScreenDriver<O extends OutputManager<P>>public WidgetFactory<O> getFactory()
getFactory in interface ScreenDriver<O extends OutputManager<P>>public void init()
init in interface ScreenDriver<O extends OutputManager<P>>public java.lang.String getWindowSystem()
ClientParameters for the list
of possible values.getWindowSystem in interface ScreenDriver<O extends OutputManager<P>>public boolean isChui()
isChui in interface ScreenDriver<O extends OutputManager<P>>true is ChUI false is GUIpublic void shutdown()
shutdown in interface ScreenDriver<O extends OutputManager<P>>public java.lang.String getHostName()
getHostName in interface ScreenDriver<O extends OutputManager<P>>public long getHostByName(java.lang.String name)
getHostByName in interface ScreenDriver<O extends OutputManager<P>>name - The name of the host to get IP.protected void setBatchMode(boolean batch)
batch - The new state of the batch mode flag.protected void setBackgroundMode(boolean background)
background - The new state of the background mode flag.protected java.io.ByteArrayInputStream playBeep(java.io.ByteArrayInputStream beepAudioData)
beepAudioData - Cached audio data to play. null to make this function load it.