@Override public Receive createReceive() { return ReceiveBuilder.create() .match(ExternalMessage.class, this::handle) .match(CommandResponse.class, this::handleCommandResponse) .match(OutboundSignal.class, this::handleOutboundSignal) .match(Signal.class, this::handleSignal) .match(DittoRuntimeException.class, this::handleDittoRuntimeException) .match(Status.Failure.class, f -> log.warning("Got failure with cause {}: {}", f.cause().getClass().getSimpleName(), f.cause().getMessage())) .matchAny(m -> { log.warning("Unknown message: {}", m); unhandled(m); }).build(); }
@Override public Receive createReceive() { return ReceiveBuilder.create() .match(ExternalMessage.class, this::handle) .match(CommandResponse.class, this::handleCommandResponse) .match(OutboundSignal.class, this::handleOutboundSignal) .match(Signal.class, this::handleSignal) .match(DittoRuntimeException.class, this::handleDittoRuntimeException) .match(Status.Failure.class, f -> log.warning("Got failure with cause {}: {}", f.cause().getClass().getSimpleName(), f.cause().getMessage())) .matchAny(m -> { log.warning("Unknown message: {}", m); unhandled(m); }).build(); }