Examples of sendStringByFuture()


Examples of org.eclipse.jetty.websocket.api.RemoteEndpoint.sendStringByFuture()

            cliSock.assertNotClosed();

            Assert.assertThat("client.connectionManager.sessions.size",client.getConnectionManager().getSessions().size(),is(1));

            RemoteEndpoint remote = cliSock.getSession().getRemote();
            remote.sendStringByFuture("Hello World!");
            if (remote.getBatchMode() == BatchMode.ON)
                remote.flush();
            srvSock.echoMessage(1,500,TimeUnit.MILLISECONDS);
            // wait for response from server
            cliSock.waitForMessage(500,TimeUnit.MILLISECONDS);
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.RemoteEndpoint.sendStringByFuture()

        };
        try (Session session = client.connect(adapter, uri).get())
        {
            RemoteEndpoint remote = session.getRemote();

            Future<Void> future = remote.sendStringByFuture("batch_mode_on");
            // The write is aggregated and therefore completes immediately.
            future.get(1, TimeUnit.MICROSECONDS);

            // Wait for the echo.
            Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.RemoteEndpoint.sendStringByFuture()

            LOG.debug("Artificial Slowness {} ms",slowness);
            Future<Void> lastMessage = null;
            RemoteEndpoint remote = session.getRemote();
            while (m.get() < messageCount)
            {
                lastMessage = remote.sendStringByFuture(message + "/" + m.get() + "/");

                m.incrementAndGet();

                if (slowness > 0)
                {
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.RemoteEndpoint.sendStringByFuture()

            cliSock.assertNotClosed();

            Assert.assertThat("client.connectionManager.sessions.size",client.getConnectionManager().getSessions().size(),is(1));

            RemoteEndpoint remote = cliSock.getSession().getRemote();
            remote.sendStringByFuture("Hello World!");
            if (remote.getBatchMode() == BatchMode.ON)
                remote.flush();
            srvSock.echoMessage(1,500,TimeUnit.MILLISECONDS);
            // wait for response from server
            cliSock.waitForMessage(500,TimeUnit.MILLISECONDS);
View Full Code Here

Examples of org.eclipse.jetty.websocket.api.RemoteEndpoint.sendStringByFuture()

            if (r == null)
            {
                return;
            }

            r.sendStringByFuture(msg);
            if (r.getBatchMode() == BatchMode.ON)
                r.flush();
        }
        finally
        {
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.