Class LaunchOptions
java.lang.Object
me.zacharias.chat.core.LaunchOptions
The Configuration class, where arguments are stored and retrieved. This is used to configure the running of the program from the Launcher.
-
Method Summary
Modifier and TypeMethodDescriptionstatic LaunchOptionsGets the singleton instance of the LaunchOptions class.intgetPort()Gets the port number that the API server should use.Gets the file path that the program should redirect output to.get the credentials for the API ServerbooleanGets if the program should automatically accept prompts.booleanRetries if old messages should be loaded.booleanGets if the program is running in display mode.booleanGets weather or not the API Server requires credentialsbooleanGets if the program is running in API server mode.booleanGets if the full message should be shown in the display.voidsetAutoAccept(boolean autoAccept) Sets if the program should automatically accept prompts.static voidsetInstance(LaunchOptions instance) Sets the singleton instance of the LaunchOptions class.voidsetLoadOld(boolean loadOld) Sets if old messages should be loaded.voidsetNotDisplay(boolean notDisplay) Sets if the program is running in display mode.voidsetPort(int port) Sets the port number that the API server should use.voidsetRedirectOutput(String redirectOutput) Sets the file path that the program should redirect output to.voidsetServerCredentials(String serverCredentials) Sets the credentials used by the API ServervoidsetServerCredentialsEnabled(boolean serverCredentialsEnabled) Sets weather credentials are needed for the API ServervoidsetServerMode(boolean serverMode) Sets if the program is running in API server mode.voidsetShowFullMessage(boolean showFullMessage) Sets if the full message should be shown in the display.
-
Method Details
-
getInstance
Gets the singleton instance of the LaunchOptions class. Meant to be used to get or set ant option.- Returns:
- The singleton instance of the LaunchOptions class.
-
setInstance
Sets the singleton instance of the LaunchOptions class. Used to reset the LaunchOptions to their default values.- Parameters:
instance- The instance to set.
-
isLoadOld
public boolean isLoadOld()Retries if old messages should be loaded.- Returns:
- a boolean indicating if old messages should be loaded.
-
setLoadOld
public void setLoadOld(boolean loadOld) Sets if old messages should be loaded.- Parameters:
loadOld- a boolean indicating if old messages should be loaded.
-
isAutoAccept
public boolean isAutoAccept()Gets if the program should automatically accept prompts.- Returns:
- a boolean indicating if the program should automatically accept prompts.
-
setAutoAccept
public void setAutoAccept(boolean autoAccept) Sets if the program should automatically accept prompts.- Parameters:
autoAccept- a boolean indicating if the program should automatically accept prompts.
-
getPort
public int getPort()Gets the port number that the API server should use.- Returns:
- the port number that the API server should use.
-
setPort
public void setPort(int port) Sets the port number that the API server should use.- Parameters:
port- the port number that the API server should use.
-
getRedirectOutput
Gets the file path that the program should redirect output to.- Returns:
- the file path that the program should redirect output to.
-
setRedirectOutput
Sets the file path that the program should redirect output to.- Parameters:
redirectOutput- the file path that the program should redirect output to.
-
isServerMode
public boolean isServerMode()Gets if the program is running in API server mode.- Returns:
- a boolean indicating if the program is running in API server mode.
-
setServerMode
public void setServerMode(boolean serverMode) Sets if the program is running in API server mode.- Parameters:
serverMode- a boolean indicating if the program is running in API server mode.
-
isServerCredentialsEnabled
public boolean isServerCredentialsEnabled()Gets weather or not the API Server requires credentials- Returns:
- if credentials is required
-
setServerCredentialsEnabled
public void setServerCredentialsEnabled(boolean serverCredentialsEnabled) Sets weather credentials are needed for the API Server- Parameters:
serverCredentialsEnabled- a boolean indicating if the APIServer needs credentials from clients
-
getServerCredentials
get the credentials for the API Server- Returns:
- the credentials
-
setServerCredentials
Sets the credentials used by the API Server- Parameters:
serverCredentials- a String of the API Server
-
isNotDisplay
public boolean isNotDisplay()Gets if the program is running in display mode.- Returns:
- a boolean indicating if the program is running in display mode.
-
setNotDisplay
public void setNotDisplay(boolean notDisplay) Sets if the program is running in display mode.- Parameters:
notDisplay- a boolean indicating if the program is running in display mode.
-
isShowFullMessage
public boolean isShowFullMessage()Gets if the full message should be shown in the display.- Returns:
- a boolean indicating if the full message should be shown.
-
setShowFullMessage
public void setShowFullMessage(boolean showFullMessage) Sets if the full message should be shown in the display.- Parameters:
showFullMessage- a boolean indicating if the full message should be shown.
-