Examples of send()


Examples of org.voltcore.messaging.Mailbox.send()

            buf.putLong(uso);

            BinaryPayloadMessage bpm = new BinaryPayloadMessage(new byte[0], buf.array());

            for( Long siteId: p.getSecond()) {
                mbx.send(siteId, bpm);
            }
        }
    }

    public void ack(final long uso) {
View Full Code Here

Examples of org.waveprotocol.box.webclient.client.atmosphere.AtmosphereConnectionImpl.send()

          socket.close();
        }

        @Override
        public void sendMessage(String message) {
          socket.send(message);
        }
      };
    }
  }
}
View Full Code Here

Examples of org.xbib.elasticsearch.websocket.client.WebSocketClient.send()

                final URI uri = new URI("ws:/" + websocketNodeAddress + "/websocket");
                client = clientFactory.newClient(uri, new WebSocketActionListener() {
                    @Override
                    public void onConnect(WebSocketClient client) {
                        nodeChannels.put(websocketNodeAddress, client);
                        client.send(frame);
                    }

                    @Override
                    public void onDisconnect(WebSocketClient client) {
                        logger.warn("node disconnected: {}", uri);
View Full Code Here

Examples of org.xbib.elasticsearch.websocket.client.WebSocketClientRequest.send()

                        @Override
                        public void onConnect(WebSocketClient client) throws IOException {
                                logger.info("sending subscribe command, channel = {}", client.channel());
                                subscribe.send(client);
                                logger.info("sending publish command (to ourselves), channel = {}", client.channel());
                                publish.send(client);
                        }

                        @Override
                        public void onMessage(WebSocketClient client, WebSocketFrame frame) {
                            logger.info("frame received: " + frame);
View Full Code Here

Examples of org.xbill.DNS.ExtendedResolver.send()

      resolver.setTimeout(timeoutInSeconds);
      resolver.setTCP(true);

      Name name = ReverseMap.fromAddress(hostIp);
      Record record = Record.newRecord(name, Type.PTR, DClass.IN);
      Message response = resolver.send(newQuery(record));

      Record[] answers = response.getSectionArray(Section.ANSWER);
      if (answers.length == 0) {
        LOG.warn("no answer to DNS resolution attempt for "+hostIp+"; using fallback");
        return fallback(hostIp);
View Full Code Here

Examples of org.xbill.DNS.Resolver.send()

      resolver.setTimeout(timeoutInSeconds);
      resolver.setTCP(true);

      Name name = ReverseMap.fromAddress(hostIp);
      Record record = Record.newRecord(name, Type.PTR, DClass.IN);
      Message response = resolver.send(newQuery(record));

      Record[] answers = response.getSectionArray(Section.ANSWER);
      if (answers.length == 0) {
        LOG.warn("no answer to DNS resolution attempt for "+hostIp+"; using fallback");
        return fallback(hostIp);
View Full Code Here

Examples of org.xbill.DNS.SimpleResolver.send()

                SimpleResolver resolver = new SimpleResolver();
                int type = Type.TXT;
                Name name = Name.fromString(String.valueOf(exchange.getIn().getHeader(DnsConstants.TERM)) + ".wp.dg.cx", Name.root);
                Record rec = Record.newRecord(name, type, DClass.IN);
                Message query = Message.newQuery(rec);
                Message response = resolver.send(query);
                Record[] records = response.getSectionArray(Section.ANSWER);
                if (records.length > 0) {
                    exchange.getOut().setBody(records[0].rdataToString());
                } else {
                    exchange.getOut().setBody(null);
View Full Code Here

Examples of org.xlightweb.IHttpExchange.send()

      System.out.println("read received server data");
      String reveived = srvSideDataSource.readStringByLength(srvSideDataSource.available());
     
      Assert.assertEquals(sent.toString(), reveived);

      srvExchange.send(new HttpResponse(200));
     
      Assert.assertEquals(200, respHdl.getResponse().getStatus());
     
      con.close();
      server.close();
View Full Code Here

Examples of org.xlightweb.client.HttpClientConnection.send()

        server.start();
       
        HttpClientConnection con = new HttpClientConnection("localhost", server.getLocalPort());

        FutureResponseHandler hdl = new FutureResponseHandler();
        BodyDataSink ds = con.send(new HttpRequestHeader("POST", "http://localhost:"  +server.getLocalPort() + "/", "text/plain"), 200, hdl);
        for (int i = 0; i < 20; i++) {
            ds.write("0123456789");
            QAUtil.sleep(50);
        }
        ds.close();
View Full Code Here

Examples of org.xlightweb.client.IHttpClientEndpoint.send()


    IHttpClientEndpoint httpClient = new HttpClient();

    NonThreadedResponseHandler hdl = new NonThreadedResponseHandler();
    httpClient.send(new GetRequest("http://localhost:" + server.getLocalPort() + "/"), hdl);

    while (hdl.getResponse() == null) {
        QAUtil.sleep(100);
    }
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.