com.quorum.tessera.enclave.rest.ClientCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enclave-jaxrs Show documentation
Show all versions of enclave-jaxrs Show documentation
Tessera is a stateless Java system that is used to enable the encryption, decryption, and distribution of private transactions for Quorum.
package com.quorum.tessera.enclave.rest;
import com.quorum.tessera.enclave.EnclaveNotAvailableException;
import jakarta.ws.rs.ProcessingException;
import java.net.ConnectException;
public interface ClientCallback {
T doExecute() throws ProcessingException;
static T execute(ClientCallback callback) {
try {
return callback.doExecute();
} catch (ProcessingException ex) {
if (ConnectException.class.isInstance(ex.getCause())) {
throw new EnclaveNotAvailableException(ex.getCause().getMessage());
}
throw ex;
}
}
}