public class ArgumentHelper extends Object
| Constructor and Description |
|---|
ArgumentHelper(@NonNull String[] args,
@NonNull String serverName)
Parse the main arguments
If the list network flag is specified, a list of internet interface will be displayed and the program will exit
|
ArgumentHelper(@NonNull String[] args,
@NonNull String serverName,
net.sourceforge.argparse4j.inf.ArgumentParser baseParser)
Parse the main arguments
If the list network flag is specified, a list of internet interface will be displayed and the program will exit
|
| Modifier and Type | Method and Description |
|---|---|
Path |
getCertificateFile()
Get server certificate file
|
String |
getCertificatePassword()
Get certificate password
|
Optional<Path> |
getConfigFile()
Get server configuration file
|
Optional<String> |
getHost()
Get server host
|
Optional<String> |
getInterface()
Get network interface (used for discovery)
|
Optional<Integer> |
getPort()
Get server port
|
Path |
getPrivateKeyFile()
Get server private key file
|
boolean |
hasNetworkDiscovery()
Whether network discovery is enabled or not
|
boolean |
isSimulationEnabled()
Get server simulation mode
|
boolean |
useUnsafeCommunication()
Use unsafe communication
|
public ArgumentHelper(@NonNull
@NonNull String[] args,
@NonNull
@NonNull String serverName)
args - The main argumentsserverName - The server namepublic ArgumentHelper(@NonNull
@NonNull String[] args,
@NonNull
@NonNull String serverName,
net.sourceforge.argparse4j.inf.ArgumentParser baseParser)
args - The main argumentsserverName - The server namebaseParser - If you want to extend the default parser with other flagspublic Optional<String> getInterface()
public Optional<Path> getConfigFile()
public Path getPrivateKeyFile()
public String getCertificatePassword()
public Path getCertificateFile()
public boolean isSimulationEnabled()
public boolean hasNetworkDiscovery()
public boolean useUnsafeCommunication()
Copyright © 2022 SiLA Java Developers. All rights reserved.