Examples of Message


Examples of com.twilio.sdk.resource.instance.Message

  /* (non-Javadoc)
   * @see com.twilio.sdk.resource.ListResource#makeNew(com.twilio.sdk.TwilioRestClient, java.util.Map)
   */
  @Override
  protected Message makeNew(TwilioRestClient client, Map<String, Object> params) {
    return new Message(client, params);
  }
View Full Code Here

Examples of com.volantis.mps.bms.Message

        alice.setChannel("smtp");

        SendRequest request = factory.createSendRequest();
        request.addRecipient(alice);

        Message message = factory.createMessage(
                new URL("http://localhost:8080/volantis/welcome/welcome.xdime"));
        message.setSubject("Hello");
        request.setMessage(message);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        parser.write(request, out);
View Full Code Here

Examples of com.volantis.xml.pipeline.sax.impl.drivers.webservice.Message

            InputSource wsdlInputSource,
                                           Operation operation,
            Message message)
            throws WSDLException, WSIFException {

        Message result = null;

        Definition def = createDefinition(wsdlInputSource);

        Service service = WSIFUtils.selectService(def, null, null);
View Full Code Here

Examples of com.wordnik.swaggersocket.protocol.Message

                    } catch (Exception ex) {
                        logger.warn("", ex);
                    }
                    return Action.CANCELLED;
                } else {
                    Message swaggerSocketMessage = mapper.readValue(data, Message.class);
                    swaggerSocketMessage.transactionID(UUID.randomUUID().toString());

                    String identity = (String) getContextValue(request, IDENTITY);

                    if (!swaggerSocketMessage.getIdentity().equals(identity)) {
                        StatusMessage statusMessage = new StatusMessage.Builder().status(new StatusMessage.Status(503, "Not Allowed"))
                                .identity(swaggerSocketMessage.getIdentity()).build();
                        response.getOutputStream().write(mapper.writeValueAsBytes(statusMessage));
                        return Action.CANCELLED;
                    }

                    transactionIdentity.set(swaggerSocketMessage.transactionID());

                    List<Request> requests = swaggerSocketMessage.getRequests();
                    addContextValue(request, swaggerSocketMessage.transactionID() + RESPONSE_COUNTER, new AtomicInteger(requests.size()));

                    AtmosphereRequest ar;
                    for (Request req : requests) {
                        ar = toAtmosphereRequest(request, req);
                        try {
View Full Code Here

Examples of com.zanox.rabbiteasy.Message

        brokerSetup.prepareSimpleTest();
        TestConsumer testConsumer = new TestConsumer();
        ConsumerContainer consumerContainer = prepareConsumerContainer(testConsumer, TestBrokerSetup.TEST_QUEUE);
        consumerContainer.startAllConsumers();
        for (int i=1; i<=MESSAGE_AMOUNT; i++) {
            Message message = new Message()
                    .exchange(TestBrokerSetup.TEST_EXCHANGE)
                    .routingKey(TestBrokerSetup.TEST_ROUTING_KEY)
                    .body("" + i);
            publisher.publish(message);
        }
        // Sleep depending on the amount of messages sent but at least 100 ms, and at most 1 sec
        Thread.sleep(Math.max(100, Math.min(1000, MESSAGE_AMOUNT * 10)));
        List<Message> receivedMessages = testConsumer.getReceivedMessages();
        Assert.assertEquals(MESSAGE_AMOUNT, receivedMessages.size());
        for (int i=1; i<=MESSAGE_AMOUNT; i++) {
            Message receivedMessage = receivedMessages.get(i-1);
            Assert.assertNotNull(receivedMessage);
            Assert.assertEquals(i, (int)receivedMessage.getBodyAs(Integer.class));
        }
    }
View Full Code Here

Examples of com.zeonfederated.mailclient.Message

      out.println("LIST");
     
      if(isOK()) {
        String line = in.readLine();
        ArrayList<Integer> ids = new ArrayList<Integer>();
        Message curMsg;
       
        while(! line.equals(".")) {
          ids.add(Integer.parseInt(line.split(" ")[0]));
          line = in.readLine();
        }
View Full Code Here

Examples of com.zesped.model.Message

  public Resolution form() {
    final String sId = getParam("id");
    final String sUid = getSessionAttribute("user_uuid");
    try {
      connect();
        msg = new Message(getSession().getDms(), sId);
        if (!msg.getReaded()) {
          msg.setReaded(true);
          msg.save(getSession());
        }
        if (msg.getRelatedDocument()!=null) {
          if (msg.getRelatedDocument().length()>0) {
            lnk = "Edit"+getSession().getDms().getDocument(msg.getRelatedDocument()).type().name()+".action?a=0&id="+msg.getRelatedDocument();
          }
        }
        disconnect();
      } catch (Exception xcpt) {
        Log.out.error(xcpt.getMessage(), xcpt);
      } finally {
        close();
      }
    if (!msg.getStringNull("sender_id", "").equals(sUid) && !msg.getStringNull("recipient_id", "").equals(sUid)) {
        Log.out.error("SecurityException user "+sUid+" is trying to view message "+sId+" which is not for him");
      msg = new Message();
    }
    return new ForwardResolution(FORM);
  }
View Full Code Here

Examples of cu.repsystestbed.simulation.messages.Message

  {
    Agent receiver = this.registeredAgents.get(msg.getReceiver().id);
    //always store a copy of the msg
    synchronized(this.messages)
    {
      receiver.processMessage(new Message(msg))
      deleteMsg(msg);
    }

  }
View Full Code Here

Examples of cz.matfyz.aai.fantom.message.Message

    phantomClient.sendMessage(msgStart);
    logger.trace("Message sent");
   
    // Place the detectives.
    logger.trace("Receiving actor placement from the detectives");
    Message msg = detectiveClient.receiveMessage(graph);
    if(!(msg instanceof MessageMove))
      throw new ProtocolException("'move' message was expected from the detective client", detectiveClient);
    logger.debug("Message received");
   
    MessageMove detectivePlacements = (MessageMove) msg;
View Full Code Here

Examples of de.bamberg.ha.api.messaging.Message


  protected void processEvent(MessageEvent event) {
    if (parser!=null) {
      if (processingRouteChain!=null) {
        Message parsedMessage=null;
        try {
          parsedMessage=parser.parse(event.getMessage());
          Future<DistributedExecutionResult> future=processingRouteChain.processChain(parsedMessage);
          createPendingResponse(event,future);
        } catch (MessageRoutingException 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.