io.vertx.rxjava3.ext.auth

## Class VertxContextPRNG

- java.lang.Object
- - io.vertx.rxjava3.ext.auth.prng.VertxContextPRNG
  - - io.vertx.rxjava3.ext.auth.VertxContextPRNG

- All Implemented Interfaces:
    io.vertx.lang.rx.RxDelegate

  Deprecated.

      @Deprecated
      public class VertxContextPRNG
      extends VertxContextPRNG
      implements io.vertx.lang.rx.RxDelegate

  A secure non blocking random number generator isolated to the current context. The PRNG is bound to the vert.x context and setup to close when the context shuts down.

  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.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<VertxContextPRNG>` | `__TYPE_ARG` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VertxContextPRNG(Object delegate)` Deprecated.
    `VertxContextPRNG(VertxContextPRNG delegate)` Deprecated.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static VertxContextPRNG` | `current()` Deprecated.
    `static VertxContextPRNG` | `current(Vertx vertx)` Deprecated.
    `boolean` | `equals(Object o)` Deprecated.
    `VertxContextPRNG` | `getDelegate()` Deprecated.
    `int` | `hashCode()` Deprecated.
    `static VertxContextPRNG` | `newInstance(VertxContextPRNG arg)` Deprecated.
    `String` | `toString()` Deprecated.

    - ### Methods inherited from class io.vertx.rxjava3.ext.auth.prng.VertxContextPRNG

      `close, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, nextString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<VertxContextPRNG> __TYPE_ARG

      Deprecated.

  - ### Constructor Detail

    - #### VertxContextPRNG

          public VertxContextPRNG(VertxContextPRNG delegate)

      Deprecated.

    - #### VertxContextPRNG

          public VertxContextPRNG(Object delegate)

      Deprecated.

  - ### Method Detail

    - #### toString

          public String toString()

      Deprecated.
      Overrides:
        `toString` in class `VertxContextPRNG`

    - #### equals

          public boolean equals(Object o)

      Deprecated.
      Overrides:
        `equals` in class `VertxContextPRNG`

    - #### hashCode

          public int hashCode()

      Deprecated.
      Overrides:
        `hashCode` in class `VertxContextPRNG`

    - #### getDelegate

          public VertxContextPRNG getDelegate()

      Deprecated.
      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`
      Overrides:
        `getDelegate` in class `VertxContextPRNG`

    - #### current

          @Deprecated
          public static VertxContextPRNG current()

      Deprecated.
      Get or create a secure non blocking random number generator using the current vert.x context. If there is no current context (i.e.: not running on the eventloop) then a `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.
      Returns:
        A secure non blocking random number generator.

    - #### current

          @Deprecated
          public static VertxContextPRNG current(Vertx vertx)

      Deprecated.
      Get or create a secure non blocking random number generator using the current vert.x instance. Since the context might be different this method will attempt to use the current context first if available and then fall back to create a new instance of the PRNG. 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.
      Parameters:
        `vertx` - a Vert.x instance.
      Returns:
        A secure non blocking random number generator.

    - #### newInstance

          public static VertxContextPRNG newInstance(VertxContextPRNG arg)

      Deprecated.

Copyright © 2025 Eclipse. All rights reserved.