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 Summary
ConstructorsConstructorDescriptionDelegatingAsyncKeyEncapsulationService(KeyEncapsulationService delegate, Executor executor) Creates an instance of aDelegatingAsyncKeyEncapsulationServicerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondecapsulateAsync(byte[] encapsulation, Map<String, String> metadata) Decapsulates encapsulated bytes.delegate()Returns the value of thedelegaterecord component.encapsulateAsync(KeyEncapsulationOptions options) Creates a new key, encapsulates it and returns the result.final booleanIndicates whether some other object is "equal to" this one.executor()Returns the value of theexecutorrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DelegatingAsyncKeyEncapsulationService
Creates an instance of aDelegatingAsyncKeyEncapsulationServicerecord class.- Parameters:
delegate- the value for thedelegaterecord componentexecutor- the value for theexecutorrecord component
-
-
Method Details
-
encapsulateAsync
Description copied from interface:AsyncKeyEncapsulationServiceCreates a new key, encapsulates it and returns the result.- Specified by:
encapsulateAsyncin interfaceAsyncKeyEncapsulationService- Parameters:
options- the encapsulation options- Returns:
- a
CompletionStagethat completes with the encapsulation result
-
decapsulateAsync
public CompletionStage<SecretKey> decapsulateAsync(byte[] encapsulation, Map<String, String> metadata) Description copied from interface:AsyncKeyEncapsulationServiceDecapsulates encapsulated bytes.- Specified by:
decapsulateAsyncin interfaceAsyncKeyEncapsulationService- Parameters:
encapsulation- the encapsulated bytes, must not benullmetadata- the key metadata, must not benull- Returns:
- a
CompletionStagethat completes with the decapsulated key
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
delegate
Returns the value of thedelegaterecord component.- Returns:
- the value of the
delegaterecord component
-
executor
Returns the value of theexecutorrecord component.- Returns:
- the value of the
executorrecord component
-