APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.internal.event

public final Class EventHelper

extends Object
Class Inheritance
Imports
jdk.internal.access.JavaUtilJarAccess, .SharedSecrets, jdk.internal.misc.ThreadTracker, java.lang.invoke.MethodHandles, .VarHandle, java.time.Duration, .Instant, java.util.Date, java.util.stream.Collectors, .LongStream

A helper class to have events logged to a JDK Event Logger.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final JavaUtilJarAccess
private static final System.Logger.Level
private static final VarHandle
private static volatile boolean
private static final String
private static volatile System.Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
private static String

Returns:

A string representing duraction from start time to time of this method call. Empty string is start is null.
getDurationString
(Instant
Instant indicating when event started recording
start
)

Method to calculate a duration timestamp for events which measure the start and end times of certain operations.

public static boolean

Returns:

boolean indicating whether an event should be logged
isLoggingSecurity
()

Helper to determine if security events are being logged at a preconfigured logging level.

public static void
public static void
logTLSHandshakeEvent(Instant start, String peerHost, int peerPort, String cipherSuite, String protocolVersion, long peerCertId)

public static void
logX509CertificateEvent(String algId, String serialNum, String subject, String issuer, String keyType, int length, long certId, long beginDate, long endDate)

public static void
logX509ValidationEvent(long anchorCertId, long[] certIds)

private static Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

JUJAback to summary
private static final JavaUtilJarAccess JUJA
LOG_LEVELback to summary
private static final System.Logger.Level LOG_LEVEL
LOGGER_HANDLEback to summary
private static final VarHandle LOGGER_HANDLE
loggingSecurityback to summary
private static volatile boolean loggingSecurity
SECURITY_LOGGER_NAMEback to summary
private static final String SECURITY_LOGGER_NAME
securityLoggerback to summary
private static volatile System.Logger securityLogger

Constructor Detail

EventHelperback to summary
public EventHelper()

Method Detail

endLookupback to summary
private static void endLookup(Object key)
getDurationStringback to summary
private static String getDurationString(Instant start)

Method to calculate a duration timestamp for events which measure the start and end times of certain operations.

Parameters
start:Instant

Instant indicating when event started recording

Returns:String

A string representing duraction from start time to time of this method call. Empty string is start is null.

isLoggingSecurityback to summary
public static boolean isLoggingSecurity()

Helper to determine if security events are being logged at a preconfigured logging level. The configuration value is read once at class initialization.

Returns:boolean

boolean indicating whether an event should be logged

logSecurityPropertyEventback to summary
public static void logSecurityPropertyEvent(String key, String value)
logTLSHandshakeEventback to summary
public static void logTLSHandshakeEvent(Instant start, String peerHost, int peerPort, String cipherSuite, String protocolVersion, long peerCertId)
logX509CertificateEventback to summary
public static void logX509CertificateEvent(String algId, String serialNum, String subject, String issuer, String keyType, int length, long certId, long beginDate, long endDate)
logX509ValidationEventback to summary
public static void logX509ValidationEvent(long anchorCertId, long[] certIds)
tryBeginLookupback to summary
private static Object tryBeginLookup()
jdk.internal.event back to summary

private Class EventHelper.ThreadTrackHolder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv static final ThreadTracker

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TRACKERback to summary
pack-priv static final ThreadTracker TRACKER

Constructor Detail

ThreadTrackHolderback to summary
private ThreadTrackHolder()