Class AuditUtils

java.lang.Object
org.openehealth.ipf.commons.audit.utils.AuditUtils

public class AuditUtils extends Object
Utility functions for obtaining local system context such as local hostname or IP address
Since:
3.5
Author:
Christian Ohr
  • Constructor Details

    • AuditUtils

      public AuditUtils()
  • Method Details

    • getProcessId

      public static String getProcessId()
      Returns:
      the process ID of the running process
    • getLocalIPAddress

      public static String getLocalIPAddress()
      Returns:
      the IP Address of the local host or "unknown"
    • getLocalHostName

      public static String getLocalHostName()
      Returns:
      the name of the host or "unknown"
    • getUserName

      public static String getUserName()
      Returns:
      the name of the user running the process
    • getHostFromUrl

      public static String getHostFromUrl(String url)
      Parameters:
      url - a (remote) url
      Returns:
      the host name extracted from the provided URL
    • localInetAddress

      public static Optional<InetAddress> localInetAddress()