Created
January 31, 2020 23:42
-
-
Save akgupta/dbcb99e1780606c36fb4160ace045ff9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getContext().watch(_eventSourceActor); | |
@Override | |
public Receive createReceive() { | |
return receiveBuilder() | |
.match( | |
Terminated.class, | |
terminated -> { | |
if (terminated.getActor().equals(_eventSourceActor)) { | |
getContext().stop(self()); | |
} | |
} | |
) | |
.build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment