Class AuditUtils
java.lang.Object
org.openehealth.ipf.commons.audit.utils.AuditUtils
Utility functions for obtaining local system context such as
local hostname or IP address
- Since:
- 3.5
- Author:
- Christian Ohr
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getHostFromUrl
(String url) static String
static String
static String
static String
static Optional<InetAddress>
-
Constructor Details
-
AuditUtils
public AuditUtils()
-
-
Method Details
-
getProcessId
- Returns:
- the process ID of the running process
-
getLocalIPAddress
- Returns:
- the IP Address of the local host or "unknown"
-
getLocalHostName
- Returns:
- the name of the host or "unknown"
-
getUserName
- Returns:
- the name of the user running the process
-
getHostFromUrl
- Parameters:
url
- a (remote) url- Returns:
- the host name extracted from the provided URL
-
localInetAddress
-