VertxContextPRNG@Deprecated public interface VertxContextPRNG extends VertxContextPRNG
When applicable, use of VertxContextPRNG rather than create new PRNG objects is helpful to keep the system entropy usage to the minimum avoiding potential blocking across the application.
The use of VertxContextPRNG is particularly appropriate when multiple handlers use random numbers.
| Modifier and Type | Method and Description |
|---|---|
static VertxContextPRNG |
current()
Deprecated.
Get or create a secure non blocking random number generator using the current vert.x context.
|
static VertxContextPRNG |
current(Context context)
Deprecated.
Get or create a secure non blocking random number generator using the provided vert.x context.
|
static VertxContextPRNG |
current(Vertx vertx)
Deprecated.
Get or create a secure non blocking random number generator using the current vert.x instance.
|
close, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, nextStringstatic VertxContextPRNG current()
IllegalStateException is thrown.
Note, if a context isn't allowed to be used, for example, exceptions are thrown on getting and putting data,
the VertxContextPRNG falls back to instantiate a new instance of the PRNG per call.current in interface VertxContextPRNGIllegalStateException - when there is no Context instance available.static VertxContextPRNG current(Context context)
current in interface VertxContextPRNGcontext - a Vert.x context.IllegalStateException - when there is no Vertx instance available.static VertxContextPRNG current(Vertx vertx)
current in interface VertxContextPRNGvertx - a Vert.x instance.Copyright © 2025 Eclipse. All rights reserved.