All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.quorum.tessera.enclave.rest.ClientCallback Maven / Gradle / Ivy

Go to download

Tessera is a stateless Java system that is used to enable the encryption, decryption, and distribution of private transactions for Quorum.

There is a newer version: 24.4.2
Show newest version
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;
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy