Handler<P, R> typedef

Handler<P, R> = Future<TrustTaskDocument<R>?> Function(TrustTaskDocument<P> doc, ResolvedParties parties)

The business handler, called only once every framework check has passed.

Return a success response, or null for a specification that defines no success response (§4.4.1) — which yields Accepted. Throw a Refusal to refuse with a built error response; any other exception propagates to the caller of consumeInbound.

Implementation

typedef Handler<P, R> = Future<TrustTaskDocument<R>?> Function(
  TrustTaskDocument<P> doc,
  ResolvedParties parties,
);