Search in sources :

Example 1 with AwaitException

use of org.nustaq.kontraktor.AwaitException in project kontraktor by RuedigerMoeller.

the class DummyServiceKrouterClient method main.

public static void main(String[] args) {
    // connect to service via Krouter
    DummyService routerClient = (DummyService) Routing.connectClient(new WebSocketConnectable().url("ws://localhost:8888/binary").actorClass(DummyService.class).serType(SerializerType.FSTSer), x -> System.exit(1)).await();
    try {
        // throws exception if not available
        routerClient.ping().await();
    } catch (AwaitException ae) {
        ae.printStackTrace();
        System.exit(1);
    }
    runTest(routerClient);
}
Also used : DummyService(kontraktor.krouter.service.DummyService) AwaitException(org.nustaq.kontraktor.AwaitException) WebSocketConnectable(org.nustaq.kontraktor.remoting.websockets.WebSocketConnectable)

Aggregations

DummyService (kontraktor.krouter.service.DummyService)1 AwaitException (org.nustaq.kontraktor.AwaitException)1 WebSocketConnectable (org.nustaq.kontraktor.remoting.websockets.WebSocketConnectable)1