Examples of send()


Examples of java.util.concurrent.Callable.send()

                message.writeBytes(new byte[1024]);
                connection.start();
                connectionsEstablished.release();

                while (!sampleTimeDone.await(0, TimeUnit.MILLISECONDS)) {
                    producer.send(message);
                    producedMessages.incrementAndGet();
                }

                connection.close();
                workerDone.release();
View Full Code Here

Examples of javax.bluetooth.L2CAPConnection.send()

                            + receivedMessage);

                    // Send a message
                    final String message = "\nJSR-82 SERVER says hello!";
                    updateStatus("[SERVER] Sending message....");
                    connection.send(message.getBytes());
                } finally {
                    connection.close();
                    updateStatus("[SERVER] L2CAP session closed");
                }
            } catch (final IOException ioe) {
View Full Code Here

Examples of javax.isolate.Link.send()

        try {
            Link cl = Link.newLink(Isolate.currentIsolate(), isolate);
            sl = isolate.newStatusLink();
            isolate.start(cl);
            ObjectLinkMessage msg = ObjectLinkMessage.newMessage(this.cr);
            cl.send(msg);
        } catch (Exception ex) {
            throw new ShellInvocationException("Error starting isolate", ex);
        }
    }
View Full Code Here

Examples of javax.jbi.messaging.DeliveryChannel.send()

                    exchange.getFault().setBody(messageExchange.getFault().getContent());
                } else {
                    exchange.getOut().setBody(messageExchange.getMessage("out").getContent());
                }
                messageExchange.setStatus(ExchangeStatus.DONE);
                deliveryChannel.send(messageExchange);
            }

        } catch (MessagingException e) {
            throw new JbiException(e);
        } catch (URISyntaxException e) {
View Full Code Here

Examples of javax.jms.JMSProducer.send()

    @Resource(lookup = QUEUE_NAME)
    private Queue queue;

    public void sendMessage() {
        JMSProducer producer = context.createProducer();
        producer.send(queue, "a message");
    }

}
View Full Code Here

Examples of javax.jms.MessageProducer.send()

        invoiceMessage.setInt("orderId", orderId);
        invoiceMessage.setFloat("amount", amount);

        // send it!
        MessageProducer producer = session.createProducer(invoiceQueue);
        producer.send(invoiceMessage);

        logger.log(
            Level.FINE,
            "sent invoice message for PO #{0,number,integer} with amount {1,number,currency}",
            new Object[] { orderId, amount });
View Full Code Here

Examples of javax.jms.QueueSender.send()

      qc.start();
      int i;
      for (i = 0; i < 10; i++) {
        msg.setText("Test number " + i);
        qsend.send(msg);
      }

      qs.commit();
      System.out.println(i + " messages sent.");
     
View Full Code Here

Examples of javax.jms.TopicPublisher.send()

     
      TopicPublisher pub = session.createPublisher(topic);
      try
      {
         for(int i = 0; i < 10; i++)
            pub.send(session.createTextMessage("Message nr " + i));
        
         SimpleValue nondurable = (SimpleValue)component.getProperty("nonDurableSubscriptionsCount").getValue();
         SimpleValue durable = (SimpleValue)component.getProperty("durableSubscriptionsCount").getValue();
         SimpleValue all = (SimpleValue)component.getProperty("allSubscriptionsCount").getValue();
         SimpleValue allMessageCount = (SimpleValue)component.getProperty("allMessageCount").getValue();
View Full Code Here

Examples of javax.mail.Transport.send()

                // Avoid a loop if we are stuck
                nAddresses = remainingAddresses.length;

                try {
                    // Send to the list of remaining addresses, ignoring the addresses attached to the message
                    transport.send(message, remainingAddresses);
                } catch(SendFailedException ex) {
                    bFailedToSome=true;
                    sendex.setNextException(ex);

                    // Extract the remaining potentially good addresses
View Full Code Here

Examples of javax.microedition.io.UDPDatagramConnection.send()

                try {
                    final byte[] buf = new byte[256];

                    // Send request
                    Datagram packet = udpCon.newDatagram(buf, buf.length);
                    udpCon.send(packet);

                    // Get response
                    packet = udpCon.newDatagram(buf, buf.length);
                    udpCon.receive(packet);
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.