private void invoke(
            ServiceRequestContext ctx, SerializationFormat serializationFormat, int seqId,
            ThriftFunction func, RpcRequest call, CompletableFuture<HttpResponse> res) {

        final RpcResponse reply;

        try (SafeCloseable ignored = ctx.push()) {
            reply = unwrap().serve(ctx, call);
        } catch (Throwable cause) {
            handleException(ctx, res, serializationFormat, seqId, func, cause);
            return;
        }

        reply.handle((result, cause) -> {
            if (func.isOneWay()) {
                handleOneWaySuccess(ctx, reply, res, serializationFormat);
                return null;
            }

            if (cause != null) {
                handleException(ctx, res, serializationFormat, seqId, func, cause);
                return null;
            }

            try {
                handleSuccess(ctx, reply, res, serializationFormat, seqId, func, result);
            } catch (Throwable t) {
                handleException(ctx, res, serializationFormat, seqId, func, t);
                return null;
            }

            return null;
        }).exceptionally(CompletionActions::log);
    }
Returns the default {@link SerializationFormat} of this service.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/server/thrift/THttpService.java