Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
RuedigerMoeller committed Aug 8, 2017
1 parent 83b61d2 commit f95b8e5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package docsamples.jsinterop.javaserves;

import org.nustaq.kontraktor.remoting.encoding.SerializerType;
import org.nustaq.kontraktor.remoting.websockets.WebSocketConnectable;

public class PlainGreeterClient {
public static void main(String[] args) {
Greeter remote = (Greeter) new WebSocketConnectable()
.actorClass(Greeter.class)
.url("ws://localhost:3999")
.serType(SerializerType.JsonNoRef)
.connect( (x,y) -> System.out.println("disconnect " + x+" "+y)).await();

remote.greet("World", 1000)
.then( r -> System.out.println(r) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.nustaq.kontraktor.remoting.encoding.SerializerType;
import org.nustaq.kontraktor.remoting.websockets.WebSocketConnectable;

// connect to a javascript service using a dummy actor providing types
public class TypedGreeterClient {

public static void main(String[] args) {
Expand Down

0 comments on commit f95b8e5

Please sign in to comment.