public class VaultDecryptionResult extends AbstractResult<Plaintext>
Constructor and Description |
---|
VaultDecryptionResult(Plaintext plaintext)
Create
VaultDecryptionResult for a successfully decrypted Plaintext
. |
VaultDecryptionResult(VaultException exception)
Create
VaultDecryptionResult for an error during decryption. |
Modifier and Type | Method and Description |
---|---|
protected Plaintext |
get0() |
String |
getAsString()
Return the result as
String or throw a VaultException if the
operation completed with an error. |
get, getCause, isSuccessful
public VaultDecryptionResult(Plaintext plaintext)
VaultDecryptionResult
for a successfully decrypted Plaintext
.plaintext
- must not be null.public VaultDecryptionResult(VaultException exception)
VaultDecryptionResult
for an error during decryption.exception
- must not be null.@Nullable protected Plaintext get0()
get0
in class AbstractResult<Plaintext>
@Nullable public String getAsString()
String
or throw a VaultException
if the
operation completed with an error. Use AbstractResult.isSuccessful()
to verify the
success status of this result without throwing an exception.VaultException
- if the operation completed with an error.Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.