-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83b61d2
commit f95b8e5
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
examples/docsamples/src/main/java/docsamples/jsinterop/javaserves/PlainGreeterClient.java
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
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) ); | ||
} | ||
|
||
} |
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