Package org.atmosphere.wasync

Examples of org.atmosphere.wasync.RequestBuilder.build()


        }).on(Event.OPEN, new Function<String>() {
            @Override
            public void on(String t) {
                b.get().append(t);
            }
        }).open(clientRequest.build());

        latch.await(5, TimeUnit.SECONDS);

        server.stop();
View Full Code Here


        }).on(Event.OPEN, new Function<String>() {
            @Override
            public void on(String t) {
                b.get().append(t);
            }
        }).open(clientRequest.build());

        socket.fire("PING");
        flatch.await(5, TimeUnit.SECONDS);

        server.stop();
View Full Code Here

        }).on(Event.OPEN, new Function<String>() {
            @Override
            public void on(String t) {
                b.get().append(t);
            }
        }).open(clientRequest.build());

        socket.fire("PING");
        latch.await(10, TimeUnit.SECONDS);
        flatch.await(10, TimeUnit.SECONDS);
View Full Code Here

            @Override
            public void on(EventPOJO t) {
                close.set(t);
                xlatch.countDown();
            }
        }).open(request.build()).fire("echo");

        latch.await(5, TimeUnit.SECONDS);

        socket.close();
View Full Code Here

            }).on(Event.CLOSE.name(), new Function<String>() {
                @Override
                public void on(String t) {
                    logger.info("Connection closed");
                }
            }).open(request.build());
        } catch (IOException ex) {
            ioException = ex;
        }

        assertTrue(latch.await(10, TimeUnit.SECONDS));
View Full Code Here

            public void on(Throwable t) {
                t.printStackTrace();
                latch.countDown();
            }

        }).open(request.build());

        latch.await();


        logger.error("SOCKET STATUS [{}]", socket.status());
View Full Code Here

            @Override
            public void on(String t) {
                latch.countDown();
            }

        }).open(request.build()).fire("PING");

        l.await(5, TimeUnit.SECONDS);
        server.stop();
        latch.await(5, TimeUnit.SECONDS);
View Full Code Here

                .header("X-Test", "foo")
                .transport(transport());

        Socket socket = client.create();

        socket.open(request.build()).close();

        closedByClient.await(10, TimeUnit.SECONDS);
        assertEquals(ref.get(), "foo");

    }
View Full Code Here

            public void on(Throwable t) {
                t.printStackTrace();
                latch.countDown();
            }

        }).open(request.build()).fire("PING").get();

        latch.await(5, TimeUnit.SECONDS);
        server.stop();
        socket.close();
View Full Code Here

            public void on(String t) {
                logger.info("Serialized Function invoked {}", t);
                response.get().append(t);
                latch.countDown();
            }
        }).open(request.build())
                .fire("PING")
                .fire("PONG").get();

        latch.await(10, TimeUnit.SECONDS);
        socket.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.