package com.fireflysource.common.actor;

import com.fireflysource.common.sys.Result;

import java.util.concurrent.CompletableFuture;

abstract public class AbstractAsyncActor<T> extends AbstractActor<T> {


    @Override
    public void onReceive(T message) {
        pause();
        onReceiveAsync(message).handle((result, throwable) -> {
            resume();
            return Result.DONE;
        });
    }

    abstract public CompletableFuture<Void> onReceiveAsync(T message);
}

@@ -199,16 +199,231 @@
 r%3CT%3E %7B%0A%0A
+    public AbstractAsyncActor() %7B%0A        super();%0A    %7D%0A%0A    public AbstractAsyncActor(String address, Dispatcher dispatcher, Mailbox%3CT, SystemMessage%3E mailbox) %7B%0A        super(address, dispatcher, mailbox);%0A    %7D%0A
 %0A    @Ov

add overload constructors