public interface Application extends com.globalmentor.net.Resource, com.globalmentor.model.Named<String>
Every application provides a default preference node based upon the implementing application class.
| Modifier and Type | Field and Description |
|---|---|
static String[] |
NO_ARGUMENTS
An array containing no arguments.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStart()
Checks requirements, permissions, and expirations before starting.
|
void |
displayError(String message)
Displays the given error to the user
|
void |
displayError(Throwable throwable)
Displays an error message to the user for an exception.
|
void |
exit()
Exits the application with no status.
|
void |
exit(int status)
Exits the application with the given status.
|
String[] |
getArgs() |
com.globalmentor.net.Authenticable |
getAuthenticator() |
Date |
getExpirationDate() |
Preferences |
getPreferences() |
void |
initialize()
Initializes the application.
|
int |
main()
The main application method.
|
void |
setAuthenticator(com.globalmentor.net.Authenticable authenticable)
Sets the authenticator object used to retrieve client authentication.
|
static final String[] NO_ARGUMENTS
com.globalmentor.net.Authenticable getAuthenticator()
void setAuthenticator(com.globalmentor.net.Authenticable authenticable)
authenticable - The object to retrieve authentication information regarding a client.HTTPClientString[] getArgs()
Preferences getPreferences() throws SecurityException
SecurityException - Thrown if a security manager is present and it denies RuntimePermission("preferences").Date getExpirationDate()
null if there is no expiration.void initialize()
throws Exception
Exception - Thrown if anything goes wrong.int main()
boolean canStart()
true if the checks succeeded.void displayError(Throwable throwable)
throwable - The condition that caused the error.void displayError(String message)
message - The error to display.void exit()
exit(int).exit(int)void exit(int status)
status - The exit status.#canExit(),
#performExit(int)Copyright © 1996–2016 GlobalMentor, Inc.. All rights reserved.