Record Class DelegatingAsyncKeyEncapsulationService

java.lang.Object
java.lang.Record
org.neo4j.driver.internal.encryption.async.DelegatingAsyncKeyEncapsulationService
All Implemented Interfaces:
AsyncKeyEncapsulationService, BaseKeyEncapsulationService

public record DelegatingAsyncKeyEncapsulationService(KeyEncapsulationService delegate, Executor executor) extends Record implements AsyncKeyEncapsulationService
  • Constructor Details

    • DelegatingAsyncKeyEncapsulationService

      public DelegatingAsyncKeyEncapsulationService(KeyEncapsulationService delegate, Executor executor)
      Creates an instance of a DelegatingAsyncKeyEncapsulationService record class.
      Parameters:
      delegate - the value for the delegate record component
      executor - the value for the executor record component
  • Method Details

    • encapsulateAsync

      Description copied from interface: AsyncKeyEncapsulationService
      Creates a new key, encapsulates it and returns the result.
      Specified by:
      encapsulateAsync in interface AsyncKeyEncapsulationService
      Parameters:
      options - the encapsulation options
      Returns:
      a CompletionStage that completes with the encapsulation result
    • decapsulateAsync

      public CompletionStage<SecretKey> decapsulateAsync(byte[] encapsulation, Map<String,String> metadata)
      Description copied from interface: AsyncKeyEncapsulationService
      Decapsulates encapsulated bytes.
      Specified by:
      decapsulateAsync in interface AsyncKeyEncapsulationService
      Parameters:
      encapsulation - the encapsulated bytes, must not be null
      metadata - the key metadata, must not be null
      Returns:
      a CompletionStage that completes with the decapsulated key
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • delegate

      public KeyEncapsulationService delegate()
      Returns the value of the delegate record component.
      Returns:
      the value of the delegate record component
    • executor

      public Executor executor()
      Returns the value of the executor record component.
      Returns:
      the value of the executor record component