Class Keyring.StaticKeyring

java.lang.Object
org.acemq.amqp.crypto.Keyring.StaticKeyring
All Implemented Interfaces:
Keyring
Enclosing interface:
Keyring

public static final class Keyring.StaticKeyring extends Object implements Keyring
A keyring over a fixed map.
  • Method Details

    • current

      public EncryptionKey current()
      Specified by:
      current in interface Keyring
      Returns:
      the key to write with. Consulted per message, so a keyring that reloads from a secret store can change what this returns and the next message uses the new key
    • keyFor

      public SecretKey keyFor(String keyId)
      Specified by:
      keyFor in interface Keyring
      Parameters:
      keyId - an identifier read out of a message
      Returns:
      the key it names
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      the identifiers, never the keys