Examples of send()


Examples of com.aliyun.openservices.ons.api.Producer.send()

        Message msg = new Message(//
            "TopicTestONS", // Topic, 请向ONS运维人员申请
            "TagA", // Tag, 相当于子Topic概念,应用可以自由设置,Consumer消费时,可以通过他来过滤消息
            "Hello ONS".getBytes()// 消息内容,二进制形式
                );
        SendResult sendResult = producer.send(msg);
        System.out.println(sendResult);
        producer.shutdown();
       
       
View Full Code Here

Examples of com.aliyun.openservices.ons.api.bean.ProducerBean.send()

public class Producer {

    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("producer.xml");
        ProducerBean producer = (ProducerBean) ctx.getBean("producer");
        SendResult sendResult = producer.send(new Message("TopicTest", "tag", "Hello".getBytes()));
        System.out.println(sendResult);
    }
}
View Full Code Here

Examples of com.aliyun.openservices.ons.api.order.OrderProducer.send()

        Message msg = new Message(//
            "TopicTestONS", // Topic, 请向MetaQ运维人员申请
            "TagA", // Tag, 相当于子Topic概念,应用可以自由设置,Consumer消费时,可以通过他来过滤消息
            "Hello ONS".getBytes()// 消息内容,二进制形式
                );
        SendResult sendResult = producer.send(msg, new MessageQueueSelector() {

            @Override
            public int select(int queueTotal, Message msg, Object arg) {
                int value = Math.abs(arg.hashCode());
                if (value < 0) {
View Full Code Here

Examples of com.aliyun.openservices.ons.api.transaction.TransactionProducer.send()

        properties.put(PropertyKeyConst.ProducerId, "ProducerId1");
        TransactionProducer producer =
                ONSFactory.createTransactionProducer(properties, new LocalTransactionCheckerImpl());
        producer.start();
        Message msg = new Message("TopicTestONS", "TagA", "Hello ONS".getBytes());
        SendResult sendResult = producer.send(msg, new LocalTransactionExecuter() {
            @Override
            public TransactionStatus execute(Message msg, Object arg) {
                return TransactionStatus.CommitTransaction;
            }
        }, null);
View Full Code Here

Examples of com.almende.eve.agent.AgentInterface.send()

            if (sender == null) {
              LOG.warning("Agent doesn't exist:" + agentId);
              destroyScheduler(agentId);
              return;
            }
            sender.send(request, URI.create(receiverUrl), null,
                null);
           
            if (interval > 0 && sequential && !cancelled()) {
              start(interval);
            }
View Full Code Here

Examples of com.almende.eve.transport.TransportService.send()

      if (separator != -1) {
        protocol = receiverUrl.substring(0, separator);
        service = getTransportService(protocol);
      }
      if (service != null) {
        JSONResponse response = service.send(senderId, receiverUrl, request);
        return response;
      }
      else {
        throw new ProtocolException(
          "No transport service configured for protocol '" + protocol + "'.");
View Full Code Here

Examples of com.anzsoft.client.XMPP.mandioca.XmppSession.send()

  {
    XmppSession session = JabberApp.instance().getSession();
    XmppQuery query = session.getFactory().createQuery();
    query.setIQ(jid, XmppQuery.TYPE_GET, TextUtils.genUniqueId());
    query.setQuery("http://jabber.org/protocol/disco#items");
    session.send(query,new XmppPacketListener()
    {
      public void onPacketReceived(XmppPacket packet)
      {
        onRooms(packet);
      }
View Full Code Here

Examples of com.art.anette.server.network.ClientThread.send()

        if (clientThread == null) {
            return false;
        }

        try {
            clientThread.send(obj);
            return true;
        } catch (IOException ex) {
            if (NetworkControl.wasCausedByClosedSocket(ex)) {
                logger.info("Client closed the connection");
                return false;
View Full Code Here

Examples of com.atlassian.mail.server.SMTPMailServer.send()

            email.setBody(render(options.getBodyTemplate(), context));
            if (options.getReplyToEmail() != null)
            {
                email.setReplyTo(options.getReplyToEmail());
            }
            server.send(email);

        }
        catch (MailException e)
        {
            log.error("Unable to send mail", e);
View Full Code Here

Examples of com.baasbox.service.push.PushService.send()

        boolean[] errors = new boolean[users.size()];
        PushService ps = new PushService();

        try {
            ps.send(message,users,profiles,body,errors);
            Json.ObjectMapperExt mapper = Json.mapper();
            boolean someOk = false;
            boolean someFail = false;
            for (boolean error:errors){
                if (error)someFail=true;
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.