Package i5.las2peer.tools.helper
Class L2pNodeLauncherConfiguration
java.lang.Object
i5.las2peer.tools.helper.L2pNodeLauncherConfiguration
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBootstrap
(String bootstrap) static L2pNodeLauncherConfiguration
createFromArrayArgs
(String... args) static L2pNodeLauncherConfiguration
createFromIterableArgs
(Iterable<String> args) Creates a launch configuration for theL2pNodeLauncher
from the given bunch of arguments.static L2pNodeLauncherConfiguration
createFromMainArgs
(String... argv) Usually the OS splits up the parameters on spaces.getPort()
boolean
boolean
boolean
boolean
boolean
void
setBindAddress
(InetAddress bindAddress) void
setBootstrap
(String bootstrap) void
setBootstrap
(List<String> bootstrap) void
setColoredOutput
(boolean coloredOutput) void
setDebugMode
(boolean debugMode) void
setEthereumMnemonic
(String ethereumMnemonic) void
setEthereumPassword
(String ethereumPassword) void
void
setFromFile
(String filename) void
setFromInput
(InputStream inputStream) void
setFromIterableArgs
(Iterable<String> args) Sets launch configuration from the given bunch of arguments.void
setFromMainArgs
(String... argv) void
void
setNodeIdSeed
(Long nodeIdSeed) void
void
setPrintHelp
(boolean printHelp) void
setPrintVersion
(boolean printVersion) void
setSandbox
(boolean sandbox) void
setStorageDirectory
(String storageDirectory) void
setStorageMode
(SharedStorage.STORAGE_MODE storageMode) void
setUseMonitoringObserver
(boolean useMonitoringObserver) void
void
writeToFile
(String filename)
-
Field Details
-
DEFAULT_PROPERTIES_FILENAME
- See Also:
-
ARG_HELP
- See Also:
-
ARG_SHORT_HELP
- See Also:
-
ARG_VERSION
- See Also:
-
ARG_SHORT_VERSION
- See Also:
-
ARG_WINDOWS_SHELL
- See Also:
-
ARG_SHORT_WINDOWS_SHELL
- See Also:
-
ARG_COLORED_SHELL
- See Also:
-
ARG_SHORT_COLORED_SHELL
- See Also:
-
ARG_DEBUG
- See Also:
-
ARG_SHORT_DEBUG
- See Also:
-
ARG_SHORT_BIND_ADDRESS
- See Also:
-
ARG_BIND_ADDRESS
- See Also:
-
ARG_SHORT_PORT
- See Also:
-
ARG_PORT
- See Also:
-
ARG_SHORT_BOOTSTRAP
- See Also:
-
ARG_BOOTSTRAP
- See Also:
-
ARG_SHORT_OBSERVER
- See Also:
-
ARG_OBSERVER
- See Also:
-
ARG_SHORT_LOG_DIRECTORY
- See Also:
-
ARG_LOG_DIRECTORY
- See Also:
-
ARG_SHORT_NODE_ID_SEED
- See Also:
-
ARG_NODE_ID_SEED
- See Also:
-
ARG_SHORT_SERVICE_DIRECTORY
- See Also:
-
ARG_SERVICE_DIRECTORY
- See Also:
-
ARG_SHORT_STORAGE_MODE
- See Also:
-
ARG_STORAGE_MODE
- See Also:
-
ARG_SHORT_STORAGE_DIRECTORY
- See Also:
-
ARG_STORAGE_DIRECTORY
- See Also:
-
ARG_SANDBOX
- See Also:
-
ARG_SHORT_SANDBOX
- See Also:
-
ARG_ETHEREUM_MNEMONIC
- See Also:
-
ARG_ETHEREUM_PASSWORD
- See Also:
-
-
Constructor Details
-
L2pNodeLauncherConfiguration
public L2pNodeLauncherConfiguration()
-
-
Method Details
-
createFromMainArgs
Usually the OS splits up the parameters on spaces. This breaks commands like startService(xxx, yyy), which may use spaces to separate their own arguments. This method uses the given brakets to join system arguments like [startService(xxx,] and [yyy)] into [startService(xxx, yyy)]. Usually it should be used in main(String[] args) methods.- Parameters:
argv
-- Returns:
- Returns the configuration created from given args
-
setFromMainArgs
-
createFromArrayArgs
-
createFromIterableArgs
public static L2pNodeLauncherConfiguration createFromIterableArgs(Iterable<String> args) throws IllegalArgumentException Creates a launch configuration for theL2pNodeLauncher
from the given bunch of arguments.- Parameters:
args
- A bunch of arguments that should be used as configuration values.- Returns:
- Returns the configuration.
- Throws:
IllegalArgumentException
- If an issue occurs parsing an argument.
-
setFromIterableArgs
Sets launch configuration from the given bunch of arguments.- Parameters:
args
- A bunch of arguments that should be used as configuration values.- Throws:
IllegalArgumentException
- If an issue occurs parsing an argument.
-
setFromFile
- Throws:
IOException
-
setFromFile
- Throws:
IOException
-
setFromInput
- Throws:
IOException
-
writeToFile
public void writeToFile() -
writeToFile
-
isPrintHelp
public boolean isPrintHelp() -
setPrintHelp
public void setPrintHelp(boolean printHelp) -
isPrintVersion
public boolean isPrintVersion() -
setPrintVersion
public void setPrintVersion(boolean printVersion) -
isColoredOutput
public boolean isColoredOutput() -
setColoredOutput
public void setColoredOutput(boolean coloredOutput) -
isDebugMode
public boolean isDebugMode() -
setDebugMode
public void setDebugMode(boolean debugMode) -
isSandbox
public boolean isSandbox() -
setSandbox
public void setSandbox(boolean sandbox) -
getBindAddress
-
setBindAddress
-
getPort
-
setPort
-
getBootstrap
-
setBootstrap
-
setBootstrap
-
addBootstrap
-
getStorageMode
-
useMonitoringObserver
-
setUseMonitoringObserver
public void setUseMonitoringObserver(boolean useMonitoringObserver) -
getLogDir
-
setLogDir
-
getServiceDirectories
-
getNodeIdSeed
-
setNodeIdSeed
-
getCommands
-
getStorageDirectory
-
setStorageDirectory
-
getEthereumMnemonic
-
setEthereumMnemonic
-
getEthereumPassword
-
setEthereumPassword
-