| 构造器和说明 |
|---|
WebServer() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
addSession(Connection conn)
Create a session with a given connection.
|
boolean |
getAllowOthers()
Check if remote connections are allowed.
|
ArrayList<String> |
getCommandHistoryList() |
String |
getHost() |
String |
getName()
Get the human readable name of the service.
|
int |
getPort()
Gets the port this service is listening on.
|
String |
getType()
Get the human readable short name of the service.
|
String |
getURL()
Get the URL of this service in a human readable form
|
void |
init(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(ArrayList<String> commandHistory)
Save the command history to the properties file.
|
void |
setAllowSecureCreation(boolean allowSecureCreation) |
void |
setCommandHistoryAllowed(boolean allowed) |
void |
setKey(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(String key)
key - key, or nullpublic void setAllowSecureCreation(boolean allowSecureCreation)
allowSecureCreation - whether creation of databases using the key should be allowedpublic void init(String... args)
Servicepublic String getURL()
Servicepublic String getHost()
public void start()
Servicepublic void listen()
Servicepublic boolean isRunning(boolean traceError)
Servicepublic boolean isStopped()
public boolean getAllowOthers()
ServicegetAllowOthers 在接口中 Servicepublic int getPort()
Servicepublic boolean isCommandHistoryAllowed()
public void setCommandHistoryAllowed(boolean allowed)
public void saveCommandHistoryList(ArrayList<String> commandHistory)
commandHistory - the historypublic void setShutdownHandler(ShutdownHandler shutdownHandler)
public String addSession(Connection conn) throws SQLException
conn - the connectionSQLException - on failureCopyright © 2022. All rights reserved.