Package org.omegazero.net.common
Class NetCommon
java.lang.Object
org.omegazero.net.common.NetCommon
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
System propertyorg.omegazero.net.printStackTraces
static final boolean
System propertyorg.omegazero.net.socketErrorDebug
static final String
The version string of omz-net-lib. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the version string.static boolean
Deprecated.static void
logSocketError
(org.omegazero.common.logging.Logger logger, String msg, SocketConnection conn, Throwable e)
-
Field Details
-
VERSION
The version string of omz-net-lib.This value is set by the build CI pipeline based on the event that triggered the build. Otherwise, this string is always
"$BUILDVERSION"
.getVersion()
should be used to retrieve the value to prevent compile-time string inlining.- See Also:
-
PRINT_STACK_TRACES
public static final boolean PRINT_STACK_TRACESSystem propertyorg.omegazero.net.printStackTraces
Whether the full stack trace of a socket error should be printed instead of just the error message.
Default:
false
-
SOCKET_ERROR_DEBUG
public static final boolean SOCKET_ERROR_DEBUGSystem propertyorg.omegazero.net.socketErrorDebug
Whether the default socket error handler should print socket error messages with log level DEBUG instead of WARN. This may be used to reduce log noise on public-facing servers where there may be many misbehaving clients connecting to it.
Default:
false
-
-
Constructor Details
-
NetCommon
public NetCommon()
-
-
Method Details
-
isPrintStackTraces
Deprecated.AccessPRINT_STACK_TRACES
directly instead -
logSocketError
public static void logSocketError(org.omegazero.common.logging.Logger logger, String msg, SocketConnection conn, Throwable e) -
getVersion
Returns the version string.- Returns:
- The version string
- Since:
- 2.1.0
-
PRINT_STACK_TRACES
directly instead