Class PooledConfigCryptoProvider.PooledCipherFactory

java.lang.Object
org.apache.commons.pool2.BaseObject
org.apache.commons.pool2.BasePooledObjectFactory<Cipher>
dev.orne.config.impl.PooledConfigCryptoProvider.PooledCipherFactory
All Implemented Interfaces:
org.apache.commons.pool2.PooledObjectFactory<Cipher>
Enclosing class:
PooledConfigCryptoProvider

@API(status=INTERNAL, since="1.0") public static class PooledConfigCryptoProvider.PooledCipherFactory extends org.apache.commons.pool2.BasePooledObjectFactory<Cipher>
Implementation of PooledObjectFactory that creates new instances of Cipher using an instance of ConfigCryptoEngine.
Since:
0.2
Version:
1.0, 2020-08
Author:
(w) Iker Hernaez
See Also:
  • PooledObjectFactory
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Cipher
    protected @NotNull ConfigCryptoEngine
    Returns the cryptographic engine.
    @NotNull org.apache.commons.pool2.PooledObject<Cipher>
    wrap(@NotNull Cipher obj)

    Methods inherited from class org.apache.commons.pool2.BasePooledObjectFactory

    activateObject, destroyObject, makeObject, passivateObject, validateObject

    Methods inherited from class org.apache.commons.pool2.BaseObject

    toString, toStringAppendFields

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.commons.pool2.PooledObjectFactory

    destroyObject
  • Constructor Details

    • PooledCipherFactory

      public PooledCipherFactory(@NotNull @NotNull ConfigCryptoEngine engine)
      Creates a new instance.
      Parameters:
      engine - The cryptographic engine
  • Method Details

    • getEngine

      @NotNull protected @NotNull ConfigCryptoEngine getEngine()
      Returns the cryptographic engine.
      Returns:
      The cryptographic engine
    • create

      @NotNull public @NotNull Cipher create() throws ConfigCryptoProviderException
      Specified by:
      create in class org.apache.commons.pool2.BasePooledObjectFactory<Cipher>
      Throws:
      ConfigCryptoProviderException
    • wrap

      @NotNull public @NotNull org.apache.commons.pool2.PooledObject<Cipher> wrap(@NotNull @NotNull Cipher obj)
      Specified by:
      wrap in class org.apache.commons.pool2.BasePooledObjectFactory<Cipher>