Class EstServerKeygenResponse

java.lang.Object
zeroecho.pki.server.est.EstServerKeygenResponse

public final class EstServerKeygenResponse extends Object
Immutable EST server-key-generation status with deferred encrypted delivery. Pending and terminal failures contain no body. A successful result owns no live resource until the transport opens a delivery immediately before sending response headers; discarded or timed-out worker results therefore hold no lease. Delivery is reauthorized against the retained request and its expiry when opened.
  • Method Details

    • status

      public int status()
      Returns the protocol outcome.
      Returns:
      HTTP status: 200, 202, 403, 410 or 500
    • retryAfterSeconds

      public Optional<Long> retryAfterSeconds()
      Returns the polling delay.
      Returns:
      retry delay in seconds, present exactly for 202
    • contentType

      public String contentType()
      Returns the transport media type.
      Returns:
      complete media type with deterministic boundary on success
    • openDelivery

      public EstServerKeygenResponse.Body openDelivery() throws EstProtocolException
      Acquires delivery inside the transport's owned deadline execution and before HTTP headers. The caller must close the returned body even when sending headers fails. A lease pins ciphertext while expiry or shutdown proceeds.
      Returns:
      independently owned, single-stream delivery lease
      Throws:
      IllegalStateException - for a non-success result
      EstProtocolException - with 410 for expired delivery or 503 for unavailable custody
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      status only, without request or artifact data