Package org.acemq.amqp.crypto
Class Keyring.Builder
java.lang.Object
org.acemq.amqp.crypto.Keyring.Builder
- Enclosing interface:
Keyring
Collects keys for a
Keyring that does not change while the process runs.-
Method Summary
Modifier and TypeMethodDescriptionAdds a key that can be read with but not written with.build()Adds a key and makes it the one to write with.
-
Method Details
-
add
Adds a key that can be read with but not written with.- Parameters:
id- the identifier messages carrykey- the key- Returns:
- this builder
-
current
Adds a key and makes it the one to write with.- Parameters:
id- the identifier messages will carrykey- the key- Returns:
- this builder
-
build
- Returns:
- the keyring
- Throws:
IllegalStateException- if no key was made current, because a keyring that cannot say what to write with is only half a keyring and the half that is missing would not be noticed until the first publish
-