Class Main
This class processes command-line arguments to configure the server ports for PULL, REQ/REP, and PUB messaging. If no ports are provided, default ports (1735 for PULL, 1736 for REQ/REP, and 1737 for PUB) are used. The ports must be within the valid range of 0 to 65535.
Author: Kobe Lei Version: 1.0 Package: org.kobe.xbot.JServer
This is part of the XTABLES project and facilitates server initialization for messaging and service discovery using JeroMQ.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
XTABLES_SERVER_VERSION
The version string for the XTablesServer. Includes the software name, version, build date, and Java version.
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
Main method - The entry point of the application.Parses command-line arguments to configure server settings and initialize the XTablesServer. Accepts three optional arguments for PULL, REQ/REP, and PUB ports and an additional optional flag `--additional_features=true/false` to enable or disable additional server features.
If no ports are provided, the server defaults to using 1735 for PULL, 1736 for REQ/REP, and 1737 for PUB. The method validates all provided ports to ensure they are within the range of 0 to 65535.
Errors such as invalid port formats or ranges are logged using the `logger` instance.
- Parameters:
args
- Command-line arguments for server configuration.
-