title: Akka get response as ComletedStage from actor
body: <p>I am referring to api</p>
  <p><code>Patters.ask(actor, msg, duration);</code>
  here is sample</p>
  <pre><code>class MyActor extends AbstractBehavior{
      interface Command{}
      interface SomeMessage implements Command{ INSTANCE}
      public Reveive&lt;Comamnd&gt; receive(){
         return newReceiveBuilder().onMessage(SomeMessage.class, this::someMessage).build();
      }
      private Behavior&lt;Command&gt; someMessage(SomeMessage ref){
         System.out.println(&quot;Dru lalal&quot;);
      }
  }
  
  
   ActorRef&lt;MyActor.Command&gt; myActor = ...;
   Future&lt;Object&gt; future = Patterns.ask(myActor, SomeMessage.INSTANCE, Duration.ofMillis(10000));
  </code></pre>
  <p>What is gone be object ?</p>
  <p>Obviously this won't compile. Some part of picture is missing, but javadoc doesn't state what.
  Call &quot;Patterns.ask&quot; suppose to return future with object, those value is provided by actor as business logic. But there is not business logic in actor. I assume there is suppose to be some kind of convention or mapping for method that returns value with what &quot;Patters.ask&quot; triggers.</p>
  <p>Same is true about back logic. I will not able to define receiver since it expect to return Receiver not SomeObject and thus, api want't let me bind result to some message. Only thing I can do is manually pass ComputableFuture</p>
  <pre><code>ComputableFuture&lt;MyOBject&gt;  future = new ComputableFuture&lt;&gt;();
  myActor.tell(new Message(future));
  
      private Behavior&lt;Command&gt; someMessage(Message message){
           var result = compute();
           message.future.comlete(result);
      }
  </code></pre>
  <p>And here we go, I have manually manage everything, also issues with passing non serializable message, lifecycle of objects and so on.</p>