Package org.atmosphere.wasync

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


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

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

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


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

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

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

            @Override
            public void on(String m) {
                builder.append(m);
                latch.countDown();
            }
        }).open(request.build()).fire("PING");

        latch.await(5, TimeUnit.SECONDS);

        assertEquals(builder.toString(), RESUME);
    }
View Full Code Here

            public void on(Map t) {
                map.set(t);
                latch.countDown();
            }

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

        latch.await(5, TimeUnit.SECONDS);
        socket.close();

        assertEquals(status.get(), statusCode());
View Full Code Here

            public void on(Integer statusCode) {
                status.set(statusCode);
                socket.close();
                latch.countDown();
            }
        }).open(request.build());

        latch.await(5, TimeUnit.SECONDS);
        socket.close();

        assertEquals(status.get(), notFoundCode());
View Full Code Here

            public void on(IOException t) {
                response2.set(t);
                ioLatch.countDown();
            }

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

        latch.await(5, TimeUnit.SECONDS);

        socket.fire("Yo");
View Full Code Here

                public void on(ConnectException t) {
                    response.set(t);
                    latch.countDown();
                }

            }).open(request.build());
        } catch (IOException ex) {
            ioException = ex;
        }

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

                public void on(IOException t) {
                    response.set(t);
                    latch.countDown();
                }

            }).open(request.build());
        } catch (IOException ex) {
            ioException = ex;
        }

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

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

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

        latch.await(5, TimeUnit.SECONDS);
        socket.close();

        assertEquals(response.get(), "<-echo->");
View Full Code Here

            public void on(TimeoutException t) {
                response.set(t.getClass());
                latch.countDown();
            }

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

        latch.await(5, TimeUnit.SECONDS);
        socket.close();

        assertEquals(response.get(), TimeoutException.class);
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.