File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ JVM User Language Support for [Spawn](https://github.com/eigr/spawn).
2020 - [ Async] ( #async )
2121 - [ Timeouts] ( #timeouts )
22225 . [ Deploy] ( #deploy )
23- - [ Defining an ActorSystem] ( #defining-an-actorsytem )
23+ - [ Defining an ActorSystem] ( #defining-an-actorsystem )
2424 - [ Defining an ActorHost] ( #defining-an-actorhost )
2525 - [ Activators] ( #activators )
26266 . [ Actor Model] ( #actor-model )
@@ -851,10 +851,11 @@ import io.eigr.spawn.api.Spawn;
851851import io.eigr.spawn.api.Spawn.SpawnSystem ;
852852import io.eigr.spawn.api.ActorRef ;
853853import io.eigr.spawn.api.TransportOpts ;
854+ import io.eigr.spawn.api.exceptions.SpawnException ;
854855import io.eigr.spawn.java.demo.domain.Domain ;
855856
856857public class App {
857- public static void main (String [] args ) throws Exception {
858+ public static void main (String [] args ) throws SpawnException {
858859 Spawn spawnSystem = new SpawnSystem ()
859860 .create(" spawn-system" )
860861 .withActor(Joe . class)
@@ -874,8 +875,8 @@ public class App {
874875 .setLanguage(" erlang" )
875876 .build();
876877
877- Optional< Object > maybeResponse = joeActor. invoke(" setLanguage" , msg, Domain . Reply . class);
878- Domain . Reply reply = maybeResponse . get( );
878+ joeActor. invoke(" setLanguage" , msg, Domain . Reply . class)
879+ .ifPresent(response - > log . info( " Response is: {} " , response) );
879880 }
880881}
881882```
You can’t perform that action at this time.
0 commit comments