| Constructor and Description |
|---|
WebServer() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addSession(java.sql.Connection conn)
Create a session with a given connection.
|
static java.lang.String |
encodeAdminPassword(java.lang.String password)
Generates a random salt and returns it with a hash of specified password
with this salt.
|
boolean |
getAllowOthers()
Check if remote connections are allowed.
|
java.util.ArrayList<java.lang.String> |
getCommandHistoryList() |
java.lang.String |
getHost() |
java.lang.String |
getName()
Get the human readable name of the service.
|
int |
getPort()
Gets the port this service is listening on.
|
java.lang.String |
getType()
Get the human readable short name of the service.
|
java.lang.String |
getURL()
Get the URL of this service in a human readable form
|
void |
init(java.lang.String... args)
Initialize the service from command line options.
|
boolean |
isCommandHistoryAllowed() |
boolean |
isDaemon()
Check if a daemon thread should be used.
|
boolean |
isRunning(boolean traceError)
Check if the service is running.
|
boolean |
isStopped() |
void |
listen()
Listen for incoming connections.
|
void |
saveCommandHistoryList(java.util.ArrayList<java.lang.String> commandHistory)
Save the command history to the properties file.
|
void |
setAllowSecureCreation(boolean allowSecureCreation) |
void |
setCommandHistoryAllowed(boolean allowed) |
void |
setKey(java.lang.String key)
Sets the key for privileged connections.
|
void |
setShutdownHandler(ShutdownHandler shutdownHandler) |
void |
start()
Start the service.
|
void |
stop()
Stop the service.
|
public void setKey(java.lang.String key)
key - key, or nullpublic void setAllowSecureCreation(boolean allowSecureCreation)
allowSecureCreation - whether creation of databases using the key should be allowedpublic void init(java.lang.String... args)
Servicepublic java.lang.String getURL()
Servicepublic java.lang.String getHost()
public void start()
Servicepublic void listen()
Servicepublic boolean isRunning(boolean traceError)
Servicepublic boolean isStopped()
public void stop()
Servicepublic java.lang.String getType()
Servicepublic java.lang.String getName()
Servicepublic boolean getAllowOthers()
ServicegetAllowOthers in interface Servicepublic int getPort()
Servicepublic boolean isCommandHistoryAllowed()
public void setCommandHistoryAllowed(boolean allowed)
public java.util.ArrayList<java.lang.String> getCommandHistoryList()
public void saveCommandHistoryList(java.util.ArrayList<java.lang.String> commandHistory)
commandHistory - the historypublic void setShutdownHandler(ShutdownHandler shutdownHandler)
public java.lang.String addSession(java.sql.Connection conn)
throws java.sql.SQLException
conn - the connectionjava.sql.SQLException - on failurepublic boolean isDaemon()
Servicepublic static java.lang.String encodeAdminPassword(java.lang.String password)
password - the passwordjava.lang.IllegalArgumentException - when password is too short