Small helpers without framework dependencies. They exist here because at least two modules need them; anything used by one module only belongs in that module.
| Class | Purpose |
|---|---|
KlokFastID |
randomUUID(): a random version 4 UUID drawn from ThreadLocalRandom instead of SecureRandom, so it never blocks or contends. Used for correlation ids, invocation ids and CloudEvent ids by the broker client, the Quarkus extension and the Gradle plugin. Not sortable, and never to be used as a secret or a token. |
KlokGenericTypeResolver |
Interface with default methods that resolve the actual type arguments of a class at runtime, walking the hierarchy up to the class or interface that declares the parameter. Type variables bound by intermediate generic classes are followed to the concrete class, so class MyWorker extends Worker<A, B> with class Worker<REQ, RES> extends Processing<REQ, RES> resolves Processing's first parameter to A. The Quarkus extension uses it to find the datamodels of a route from its class signature; the gradle plugin's documentation scan uses the same rules on source level. |
KlokDateHelper |
XMLGregorianCalendar conversions and formatting for the XSD generated datamodels (xmlGregCalNow, xmlGregCalFromDate, toFormattedString), and getDayOfWeek(Instant). The only implementation: the Quarkus extension's dev.klok.framework.helpers.KlokDateHelper is deprecated and delegates here. |
KlokSymmetricEncryption |
AES-GCM encryption of short strings into URL-safe Base64, with a key derived from a password by PBKDF2 (deriveKey, getSecretKeyFor, encrypt, decrypt). Kept by decision as the shared implementation for encrypting caller ids; no project calls it today (Design decisions). Not for secrets at rest. |
KlokStringUtils |
capitalizeFirstLetter, used by the repository naming. |
JvmHelper |
Java version, home and vendor for log banners, sleep without checked exception; the Java broker client uses it. |