| Modifier and Type | Class and Description |
|---|---|
| private class | WebServer.
The translate thread reads and writes the file translation.properties once a second. |
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private boolean | |
| private boolean | |
| private boolean | |
| private static final String | |
| private String | |
| private final HashMap | |
| private static final String | |
| private String | |
| private static final String[] | |
| private String | |
| private boolean | |
| private boolean | |
| private String | |
| pack-priv static final String[][] | |
| private final HashSet | |
| private long | |
| private Thread | |
| private int | |
| private final Set | |
| private String | |
| private ServerSocket | |
| private static final long | SESSION_TIMEOUT
The session timeout (the default is 30 minutes). |
| private final HashMap | |
| private ShutdownHandler | |
| private boolean | |
| private String | |
| private static int | |
| private boolean | |
| private WebServer. | |
| private String | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the URL of the web site to access this connectionthe connection conn)Create a session with a given connection. |
| pack-priv boolean | Returns: true if admin password not configure, or admin password correctthe password to test password)Check the admin password. |
| pack-priv WebSession | Returns: the web session objectthe host address hostAddr)Create a new web session id and object. |
| public static String | Returns: a salt and hash of salted password as a hex encoded string to be used in configuration filethe password password)Generates a random salt and returns it with a hash of specified password with this salt. |
| private static String | |
| pack-priv byte[] | |
| pack-priv boolean | |
| public boolean | getAllowOthers()
Implements org. Check if remote connections are allowed. |
| public ArrayList | |
| pack-priv Connection | Returns: the database connectionthe driver class name driver, String the database URL databaseUrl, String the user name user, String the password password, String the key of privileged user userKey, NetworkConnectionInfo the network connection information networkConnectionInfo)Open a database connection. |
| pack-priv String | |
| pack-priv byte[] | |
| public String | |
| pack-priv String | |
| public String | |
| public int | |
| pack-priv WebSession | Returns: the web session or nullthe session id sessionId)Get the web session object for the given session id. |
| pack-priv ArrayList | |
| pack-priv ConnectionInfo | Returns: the connection informationthe setting name name)Get the connection information for this setting. |
| pack-priv String[] | Returns: the connection info namesGet the list of connection information setting names. |
| pack-priv synchronized ArrayList | |
| pack-priv boolean | |
| pack-priv String | |
| public String | getType()
Implements org. Get the human readable short name of the service. |
| public String | getURL()
Implements org. Get the URL of this service in a human readable form |
| public void | init(String...
the command line options args)Implements org. Initialize the service from command line options. |
| public boolean | |
| public boolean | |
| public boolean | isRunning(boolean
if errors should be written traceError)Implements org. Check if the service is running. |
| public boolean | |
| public void | |
| private Properties | |
| pack-priv void | readTranslations(WebSession
the session session, String the language language)Read the translation for this language and save them in the 'text' property of this session. |
| pack-priv synchronized void | |
| pack-priv void | removeSetting(String
the setting to remove name)Remove a connection information setting from the list |
| public void | saveCommandHistoryList(ArrayList<String>
the history commandHistory)Save the command history to the properties file. |
| pack-priv synchronized void | saveProperties(Properties
null or the properties webPort, webAllowOthers, and webSSL prop)Save the settings to the properties file. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | setAllowSecureCreation(boolean
whether creation of databases using the key should be allowed allowSecureCreation)
|
| public void | |
| pack-priv void | |
| public void | |
| pack-priv void | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| public void | |
| pack-priv String | Returns: the name of the file to translatethe translation map translation)Start the translation thread that reads the file once a second. |
| public void | |
| pack-priv boolean | Returns: true if a translation is availablethe language language)Check if this language is supported / translated. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | updateSetting(ConnectionInfo
the connection information info)Update a connection information setting. |
| private void |
| adminPassword | back to summary |
|---|---|
| private byte[] adminPassword | |
| allowChunked | back to summary |
|---|---|
| private boolean allowChunked | |
| allowOthers | back to summary |
|---|---|
| private boolean allowOthers | |
| allowSecureCreation | back to summary |
|---|---|
| private boolean allowSecureCreation | |
| COMMAND_HISTORY | back to summary |
|---|---|
| private static final String COMMAND_HISTORY | |
| commandHistoryString | back to summary |
|---|---|
| private String commandHistoryString | |
| connInfoMap | back to summary |
|---|---|
| private final HashMap<String, ConnectionInfo> connInfoMap | |
| DEFAULT_LANGUAGE | back to summary |
|---|---|
| private static final String DEFAULT_LANGUAGE | |
| externalNames | back to summary |
|---|---|
| private String externalNames | |
| GENERIC | back to summary |
|---|---|
| private static final String[] GENERIC | |
| host | back to summary |
|---|---|
| private String host | |
| ifExists | back to summary |
|---|---|
| private boolean ifExists | |
| isDaemon | back to summary |
|---|---|
| private boolean isDaemon | |
| key | back to summary |
|---|---|
| private String key | |
| LANGUAGES | back to summary |
|---|---|
| pack-priv static final String[][] LANGUAGES | |
| languages | back to summary |
|---|---|
| private final HashSet<String> languages | |
| lastTimeoutCheck | back to summary |
|---|---|
| private long lastTimeoutCheck | |
| listenerThread | back to summary |
|---|---|
| private Thread listenerThread | |
| port | back to summary |
|---|---|
| private int port | |
| running | back to summary |
|---|---|
| private final Set<WebThread> running | |
| serverPropertiesDir | back to summary |
|---|---|
| private String serverPropertiesDir | |
| serverSocket | back to summary |
|---|---|
| private ServerSocket serverSocket | |
| SESSION_TIMEOUT | back to summary |
|---|---|
| private static final long SESSION_TIMEOUT The session timeout (the default is 30 minutes). | |
| sessions | back to summary |
|---|---|
| private final HashMap<String, WebSession> sessions | |
| shutdownHandler | back to summary |
|---|---|
| private ShutdownHandler shutdownHandler | |
| ssl | back to summary |
|---|---|
| private boolean ssl | |
| startDateTime | back to summary |
|---|---|
| private String startDateTime | |
| ticker | back to summary |
|---|---|
| private static int ticker | |
| trace | back to summary |
|---|---|
| private boolean trace | |
| translateThread | back to summary |
|---|---|
| private WebServer. | |
| url | back to summary |
|---|---|
| private String url | |
| virtualThreads | back to summary |
|---|---|
| pack-priv boolean virtualThreads | |
| WebServer | back to summary |
|---|---|
| public WebServer() | |
| addSession | back to summary |
|---|---|
| public String addSession(Connection conn) throws SQLException Create a session with a given connection.
| |
| checkAdminPassword | back to summary |
|---|---|
| pack-priv boolean checkAdminPassword(String password) Check the admin password.
| |
| createNewSession | back to summary |
|---|---|
| pack-priv WebSession createNewSession(String hostAddr) Create a new web session id and object.
| |
| encodeAdminPassword | back to summary |
|---|---|
| public static String encodeAdminPassword(String password) Generates a random salt and returns it with a hash of specified password with this salt.
| |
| generateSessionId | back to summary |
|---|---|
| private static String generateSessionId() | |
| getAdminPassword | back to summary |
|---|---|
| pack-priv byte[] getAdminPassword() | |
| getAllowChunked | back to summary |
|---|---|
| pack-priv boolean getAllowChunked() | |
| getAllowOthers | back to summary |
|---|---|
| public boolean getAllowOthers() Implements org. Doc from org. Check if remote connections are allowed.
| |
| getCommandHistoryList | back to summary |
|---|---|
| public ArrayList | |
| getConnection | back to summary |
|---|---|
| pack-priv Connection getConnection(String driver, String databaseUrl, String user, String password, String userKey, NetworkConnectionInfo networkConnectionInfo) throws SQLException Open a database connection.
| |
| getExternalNames | back to summary |
|---|---|
| pack-priv String getExternalNames() | |
| getFile | back to summary |
|---|---|
| pack-priv byte[] getFile(String file) throws IOException Read the given file from the file system or from the resources.
| |
| getHost | back to summary |
|---|---|
public String getHost()
| |
| getKey | back to summary |
|---|---|
| pack-priv String getKey() Returns the key for privileged connections.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Get the human readable name of the service. | |
| getPort | back to summary |
|---|---|
| public int getPort() Implements org. Doc from org. Gets the port this service is listening on.
| |
| getSession | back to summary |
|---|---|
| pack-priv WebSession getSession(String sessionId) Get the web session object for the given session id.
| |
| getSessions | back to summary |
|---|---|
| pack-priv ArrayList | |
| getSetting | back to summary |
|---|---|
| pack-priv ConnectionInfo getSetting(String name) Get the connection information for this setting.
| |
| getSettingNames | back to summary |
|---|---|
| pack-priv String[] getSettingNames() Get the list of connection information setting names.
| |
| getSettings | back to summary |
|---|---|
| pack-priv synchronized ArrayList Get the list of connection info objects.
| |
| getSSL | back to summary |
|---|---|
| pack-priv boolean getSSL() | |
| getStartDateTime | back to summary |
|---|---|
| pack-priv String getStartDateTime() | |
| getType | back to summary |
|---|---|
| public String getType() Implements org. Doc from org. Get the human readable short name of the service. | |
| getURL | back to summary |
|---|---|
| public String getURL() Implements org. Doc from org. Get the URL of this service in a human readable form | |
| init | back to summary |
|---|---|
| public void init(String... args) Implements org. Doc from org. Initialize the service from command line options. | |
| isCommandHistoryAllowed | back to summary |
|---|---|
| public boolean isCommandHistoryAllowed() | |
| isDaemon | back to summary |
|---|---|
| public boolean isDaemon() Implements org. Doc from org. Check if a daemon thread should be used.
| |
| isRunning | back to summary |
|---|---|
| public boolean isRunning(boolean traceError) Implements org. Doc from org. Check if the service is running.
| |
| isStopped | back to summary |
|---|---|
| public boolean isStopped() | |
| listen | back to summary |
|---|---|
| public void listen() Implements org. Doc from org. Listen for incoming connections. This method blocks.
| |
| loadProperties | back to summary |
|---|---|
| private Properties loadProperties() | |
| readTranslations | back to summary |
|---|---|
| pack-priv void readTranslations(WebSession session, String language) Read the translation for this language and save them in the 'text' property of this session.
| |
| remove | back to summary |
|---|---|
| pack-priv synchronized void remove(WebThread t) Remove this web thread from the set of running threads.
| |
| removeSetting | back to summary |
|---|---|
| pack-priv void removeSetting(String name) Remove a connection information setting from the list
| |
| saveCommandHistoryList | back to summary |
|---|---|
| public void saveCommandHistoryList(ArrayList<String> commandHistory) Save the command history to the properties file. | |
| saveProperties | back to summary |
|---|---|
| pack-priv synchronized void saveProperties(Properties prop) Save the settings to the properties file.
| |
| setAdminPassword | back to summary |
|---|---|
| pack-priv void setAdminPassword(String password) | |
| setAllowChunked | back to summary |
|---|---|
| pack-priv void setAllowChunked(boolean allowChunked) | |
| setAllowOthers | back to summary |
|---|---|
| pack-priv void setAllowOthers(boolean b) | |
| setAllowSecureCreation | back to summary |
|---|---|
public void setAllowSecureCreation(boolean allowSecureCreation)
| |
| setCommandHistoryAllowed | back to summary |
|---|---|
| public void setCommandHistoryAllowed(boolean allowed) | |
| setExternalNames | back to summary |
|---|---|
| pack-priv void setExternalNames(String externalNames) | |
| setKey | back to summary |
|---|---|
| public void setKey(String key) Sets the key for privileged connections.
| |
| setPort | back to summary |
|---|---|
| pack-priv void setPort(int port) | |
| setShutdownHandler | back to summary |
|---|---|
| public void setShutdownHandler(ShutdownHandler shutdownHandler) | |
| setSSL | back to summary |
|---|---|
| pack-priv void setSSL(boolean b) | |
| shutdown | back to summary |
|---|---|
| pack-priv void shutdown() Shut down the web server. | |
| start | back to summary |
|---|---|
| public void start() Implements org. Doc from org. Start the service. This usually means create the server socket. This method must not block.
| |
| startTranslate | back to summary |
|---|---|
| pack-priv String startTranslate(Map<Object, Object> translation) Start the translation thread that reads the file once a second. | |
| stop | back to summary |
|---|---|
| public void stop() Implements org. Doc from org. Stop the service.
| |
| supportsLanguage | back to summary |
|---|---|
| pack-priv boolean supportsLanguage(String language) Check if this language is supported / translated.
| |
| trace | back to summary |
|---|---|
| pack-priv void trace(String s) Write trace information if trace is enabled.
| |
| traceError | back to summary |
|---|---|
| pack-priv void traceError(Throwable e) Write the stack trace if trace is enabled.
| |
| updateSetting | back to summary |
|---|---|
| pack-priv void updateSetting(ConnectionInfo info) Update a connection information setting.
| |
| updateURL | back to summary |
|---|---|
| private void updateURL() | |
| Modifier and Type | Field and Description |
|---|---|
| private final Path | |
| private volatile boolean | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public void | run()
Overrides java. Implements java. This method is run by the thread when it executes. |
| public void |
| file | back to summary |
|---|---|
| private final Path file | |
| stopNow | back to summary |
|---|---|
| private volatile boolean stopNow | |
| translation | back to summary |
|---|---|
| private final Map<Object, Object> translation | |
| TranslateThread | back to summary |
|---|---|
| pack-priv TranslateThread(Map<Object, Object> translation) | |
| getFileName | back to summary |
|---|---|
| public String getFileName() | |
| run | back to summary |
|---|---|
| public void run() Overrides java. Implements java. Doc from java. This method is run by the thread when it executes. Subclasses of This method is not intended to be invoked directly. If this thread is a
platform thread created with a
| |
| stopNow | back to summary |
|---|---|
| public void stopNow() | |