WebEnclaveTransport

public class WebEnclaveTransport implements EnclaveTransport, Closeable

An EnclaveTransport that uses HTTP to communciate with the host of an enclave. Specifically, this transport implementation is intended to be used when the enclave host is using conclave-web-host.

Pass an instance of this class to EnclaveClient.start to connect an EnclaveClient to the host. A single WebEnclaveTransport can support multiple clients. When closing this transport, make sure all connected clients have first disconnected by calling EnclaveClient.close.

An SSLContext object can be used if a custom SSL setup is required, for example to connect to a web server using a self-signed certificate.

See also

Constructors

WebEnclaveTransport
Link copied to clipboard
WebEnclaveTransport WebEnclaveTransport(String baseUrl)
WebEnclaveTransport
Link copied to clipboard
WebEnclaveTransport WebEnclaveTransport(String baseUrl, Duration timeout, SSLContext sslContext)

Methods

close
Link copied to clipboard
void close()
connect
Link copied to clipboard
EnclaveTransport.ClientConnection connect(EnclaveClient client)

A request to connect the given client to the host. This is called when the client calls EnclaveClient.start.

enclaveInstanceInfo
Link copied to clipboard
EnclaveInstanceInfo enclaveInstanceInfo()

Retrieve the latest version of the enclave's EnclaveInstanceInfo from the host.

The implementation will most likely need to call EnclaveInstanceInfo.deserialize once the bytes have been received from the host.

getTimeout
Link copied to clipboard
Duration getTimeout()

The connection timeout, defaults to 3 minutes.

Properties

timeout
Link copied to clipboard
private Duration timeout

The connection timeout, defaults to 3 minutes.