Examples of send()


Examples of org.apache.harmony.xnet.provider.jsse.HelloRequest.send()

        assertEquals("incorrect type", Handshake.HELLO_REQUEST, message
                .getType());
        assertEquals("incorrect HelloRequest", 0, message.length());

        HandshakeIODataStream out = new HandshakeIODataStream();
        message.send(out);
        byte[] encoded = out.getData(1000);
        assertEquals("incorrect out data length", message.length(),
                encoded.length);

        HandshakeIODataStream in = new HandshakeIODataStream();
View Full Code Here

Examples of org.apache.harmony.xnet.provider.jsse.ServerHelloDone.send()

        assertEquals("incorrect type", Handshake.SERVER_HELLO_DONE, message
                .getType());
        assertEquals("incorrect ServerHelloDone", 0, message.length());

        HandshakeIODataStream out = new HandshakeIODataStream();
        message.send(out);
        byte[] encoded = out.getData(1000);
        assertEquals("incorrect out data length", message.length(),
                encoded.length);

        HandshakeIODataStream in = new HandshakeIODataStream();
View Full Code Here

Examples of org.apache.helix.ipc.netty.NettyHelixIPCService.send()

                .resource(RESOURCE_NAME).partition(partitionName).state("ONLINE").build();

        Set<HelixAddress> destinations = secondResolver.getDestinations(scope);
        for (HelixAddress destination : destinations) {
          ByteBuf message = Unpooled.wrappedBuffer(("Hello" + i).getBytes());
          secondIPC.send(destination, messageType, UUID.randomUUID(), message);
        }
      }
    }

    // Check
View Full Code Here

Examples of org.apache.kafka.clients.producer.KafkaProducer.send()

        long sleepDeficitNs = 0;
        Stats stats = new Stats(numRecords, 5000);
        for (int i = 0; i < numRecords; i++) {
            long sendStart = System.currentTimeMillis();
            Callback cb = stats.nextCompletion(sendStart, payload.length, stats);
            producer.send(record, cb);

            /*
             * Maybe sleep a little to control throughput. Sleep time can be a bit inaccurate for times < 1 ms so
             * instead of sleeping each time instead wait until a minimum sleep time accumulates (the "sleep deficit")
             * and then make up the whole deficit in one longer sleep.
View Full Code Here

Examples of org.apache.kafka.clients.producer.MockProducer.send()

    @Test
    public void testAutoCompleteMock() throws Exception {
        MockProducer producer = new MockProducer(true);
        ProducerRecord record = new ProducerRecord(topic, "key".getBytes(), "value".getBytes());
        Future<RecordMetadata> metadata = producer.send(record);
        assertTrue("Send should be immediately complete", metadata.isDone());
        assertFalse("Send should be successful", isError(metadata));
        assertEquals("Offset should be 0", 0, metadata.get().offset());
        assertEquals(topic, metadata.get().topic());
        assertEquals("We should have the record in our history", asList(record), producer.history());
View Full Code Here

Examples of org.apache.lenya.net.SMTP.send()

     * @param body DOCUMENT ME!
     */
    public void sendMail(String host, String from, String to, String cc, String bcc,
        String subject, String body) {
        SMTP smtp = new SMTP();
        smtp.send(from, to, cc, bcc, subject, body);
    }

    /**
     * DOCUMENT ME!
     *
 
View Full Code Here

Examples of org.apache.qpid.jms.MessageProducer.send()

            for (int i = 0; i < messageCount; i++)
            {
                BytesMessage msg = _session.createBytesMessage();
                populateMessage(msg);
                producer.send(msg);
            }
            _log.info("Finished sending " + messageCount + " messages");
        }
        catch (JMSException e)
        {
View Full Code Here

Examples of org.apache.qpid.proton.engine.Sender.send()

                    break;
                } catch (java.nio.BufferOverflowException e) {
                    _buffer = new byte[_buffer.length*2];
                }
            }
            sender.send(_buffer, 0, encoded);
            _outgoing.add(delivery);
            sender.advance();
        }
        catch (URISyntaxException e)
        {
View Full Code Here

Examples of org.apache.qpid.proton.messenger.Messenger.send()

            if (subject != null) msg.setSubject(subject);
            for (String body : bodies) {
                msg.setBody(new AmqpValue(body));
                mng.put(msg);
            }
            mng.send();
            mng.stop();
        } catch (Exception e) {
            tracer.log(Level.SEVERE, "proton error", e);
        }
    }
View Full Code Here

Examples of org.apache.qpid.proton.messenger.impl.MessengerImpl.send()

            if (subject != null) msg.setSubject(subject);
            for (String body : bodies) {
                msg.setBody(new AmqpValue(body));
                mng.put(msg);
            }
            mng.send();
            mng.stop();
        } catch (Exception e) {
            tracer.log(Level.SEVERE, "proton error", e);
        }
    }
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.