Class MachineUserName

java.lang.Object
org.axonframework.update.detection.MachineUserName

@Internal public class MachineUserName extends Object
Detects the name of the operating system user account running the JVM.

The detected name is memoized after the first call, as it is not expected to change during the lifetime of the JVM.

If the user.name system property is not available, this falls back to "unknown". This method never throws and never returns null.

Since:
5.3.2
Author:
Steven van Beelen
  • Method Details

    • get

      public static String get()
      Returns the name of the operating system user account running the JVM. If it has not been detected yet, it will be detected first.
      Returns:
      the name of the operating system user account, or "unknown" if it could not be detected