class TransportAction<Request extends TransportRequest, Response extends TransportResponse> {

    protected final String actionName;

    protected TransportAction(String actionName) {
        this.actionName = actionName;
    }

    public final CompletableFuture<Response> execute(Request request) {
        return execute(request, x -> x);
    }

    public final <T> CompletableFuture<T> execute(Request request, Function<? super Response, ? extends T> mapper) {<FILL_FUNCTION_BODY>}

    protected abstract void doExecute(Request request, ActionListener<Response> listener);
}

        FutureActionListener<Response> listener = new FutureActionListener<>();
        try {
            doExecute(request, listener);
        } catch (Exception e) {
            listener.onFailure(e);
        }
        return listener.thenApply(mapper);
    
<no_super_class>