onStartMessage fix

This commit is contained in:
Egor Rutkowski 2024-07-01 15:15:25 +02:00
parent cfcebd59c9
commit 1da49a5d57
1 changed files with 3 additions and 3 deletions

View File

@ -27,12 +27,12 @@ public class Actor extends AbstractBehavior<Actor.Message> {
@Override
public Receive<Actor.Message> createReceive(){
return newReceiveBuilder()
//.onMessage(StartMessage.class, this::onStartMessage)
.onMessage(StartMessage.class, this::onStartMessage)
.build();
}
private Behavior<Message> onStartMessage(Expression expression){
this.expression = expression;
private Behavior<Message> onStartMessage(StartMessage message){
this.expression = message.expression;
return this;
}