Examples of Message


Examples of nexj.core.meta.integration.Message

      // Process only if there is no script.
      if (mapping.getOrdinal() == 0)
      {
         EndpointPart srcPart = source.getPart();
         EndpointPart dstPart = mapping.getDestination(mapping.getDestinationCount() - 1);
         Message message = null;
         boolean bParse = false;

         // Handle ref -> primitive and primitive -> ref.
         if (srcPart instanceof CompositeMessagePartRef && dstPart.isPrimitive())
         {
            message = m_context.getMetadata().getMessage(((CompositeMessagePartRef)srcPart).getRefPart().getName());
         }
         else if (dstPart instanceof CompositeMessagePartRef && srcPart.isPrimitive())
         {
            message = m_context.getMetadata().getMessage(((CompositeMessagePartRef)dstPart).getRefPart().getName());
            bParse = true;
         }

         if (message != null && message.getFormat() != null)
         {
            if (bParse)
            {
               Input in = new ObjectInput(value);
               MessageParser parser;

               if (m_parserMap == null)
               {
                  m_parserMap = new HashTab(m_context.getMetadata().getFormatCount());
               }

               parser = (MessageParser)m_parserMap.get(message.getFormat());

               if (parser == null)
               {
                  parser = (MessageParser)message.getFormat().getParser().getInstance(m_context);
                  m_parserMap.put(message.getFormat(), parser);
               }

               value = parser.parse(in, message);
            }
            else
            {
               ObjectOutput out = new ObjectOutput();
               MessageFormatter formatter;

               if (m_formatterMap == null)
               {
                  m_formatterMap = new HashTab(m_context.getMetadata().getFormatCount());
               }

               formatter = (MessageFormatter)m_formatterMap.get(message.getFormat());

               if (formatter == null)
               {
                  formatter = (MessageFormatter)message.getFormat().getFormatter().getInstance(m_context);
                  m_formatterMap.put(message.getFormat(), formatter);
               }

               formatter.format((TransferObject)value, message, out);
               value = out.getObject();
            }
View Full Code Here

Examples of ninja.utils.Message

                                .url(testServerUrl().path("/_non_existing_url"))
                                .addHeader(HttpConstants.HEADER_ACCEPT, HttpConstants.APPLICATION_JSON));

    assertEquals(404, response.httpStatus);
       
    Message message = response.payloadJsonAs(Message.class);
        Assert.assertThat(message.text, CoreMatchers.equalTo(NinjaConstant.I18N_NINJA_SYSTEM_NOT_FOUND_TEXT_DEFAULT));

  }
View Full Code Here

Examples of nu.fw.jeti.jabber.elements.Message

      g.setVisible(true);
    }
   
    public static void invite(Backend backend, JID jid,JID roomJID)
    {
      backend.send(new Message(null,roomJID,new XMUCUserInvite(jid,null)));
    }
View Full Code Here

Examples of org.activiti.bpmn.model.Message

  public void parse(XMLStreamReader xtr, BpmnModel model) throws Exception {
    if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_ID))) {
      String messageId = model.getTargetNamespace() + ":" + xtr.getAttributeValue(null, ATTRIBUTE_ID);
      String messageName = xtr.getAttributeValue(null, ATTRIBUTE_NAME);
      String itemRef = parseItemRef(xtr.getAttributeValue(null, ATTRIBUTE_ITEM_REF), model);
      Message message = new Message(messageId, messageName, itemRef);
      BpmnXMLUtil.addXMLLocation(message, xtr);
      BpmnXMLUtil.parseChildElements(ELEMENT_MESSAGE, message, xtr, model);
      model.addMessage(message);
    }
  }
View Full Code Here

Examples of org.activiti.rest.api.jpa.model.Message

 
  @Deployment(resources = {"org/activiti/rest/api/jpa/jpa-process.bpmn20.xml"})
  public void testGetJpaVariableViaTaskVariablesCollections() throws Exception {

    // Get JPA managed entity through the repository
    Message message = messageRepository.findOne(1L);
    assertNotNull(message);
    assertEquals("Hello World", message.getText());
   
    // add the entity to the process variables and start the process
    Map<String, Object> processVariables = new HashMap<String, Object>();
    processVariables.put("message", message);
     
View Full Code Here

Examples of org.antlr.tool.Message

        ErrorQueue equeue = (ErrorQueue)listener;
        if ( equeue.errors.size()>0 ) {
          allIsWell = false;
          System.err.println("antlr reports errors from "+options);
          for (int i = 0; i < equeue.errors.size(); i++) {
            Message msg = equeue.errors.get(i);
            System.err.println(msg);
          }
                    System.out.println("!!!\ngrammar:");
                    System.out.println(grammarStr);
                    System.out.println("###");
View Full Code Here

Examples of org.apache.activemq.apollo.openwire.command.Message

     * @throws IOException
     */
    public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
        super.tightUnmarshal(wireFormat, o, dataIn, bs);

        Message info = (Message)o;

        info.beforeUnmarshall(wireFormat);

        info.setProducerId((org.apache.activemq.apollo.openwire.command.ProducerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
        info.setDestination((org.apache.activemq.apollo.openwire.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
        info.setTransactionId((org.apache.activemq.apollo.openwire.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
        info.setOriginalDestination((org.apache.activemq.apollo.openwire.command.ActiveMQDestination)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
        info.setMessageId((org.apache.activemq.apollo.openwire.command.MessageId)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
        info.setOriginalTransactionId((org.apache.activemq.apollo.openwire.command.TransactionId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
        info.setGroupID(tightUnmarshalString(dataIn, bs));
        info.setGroupSequence(dataIn.readInt());
        info.setCorrelationId(tightUnmarshalString(dataIn, bs));
        info.setPersistent(bs.readBoolean());
        info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs));
        info.setPriority(dataIn.readByte());
        info.setReplyTo((org.apache.activemq.apollo.openwire.command.ActiveMQDestination)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
        info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs));
        info.setType(tightUnmarshalString(dataIn, bs));
        info.setContent(tightUnmarshalByteSequence(dataIn, bs));
        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
        info.setDataStructure((org.apache.activemq.apollo.openwire.command.DataStructure)tightUnmarsalNestedObject(wireFormat, dataIn, bs));
        info.setTargetConsumerId((org.apache.activemq.apollo.openwire.command.ConsumerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
        info.setCompressed(bs.readBoolean());
        info.setRedeliveryCounter(dataIn.readInt());

        if (bs.readBoolean()) {
            short size = dataIn.readShort();
            org.apache.activemq.apollo.openwire.command.BrokerId value[] = new org.apache.activemq.apollo.openwire.command.BrokerId[size];
            for (int i = 0; i < size; i++) {
                value[i] = (org.apache.activemq.apollo.openwire.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
            }
            info.setBrokerPath(value);
        } else {
            info.setBrokerPath(null);
        }
        info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs));
        info.setUserID(tightUnmarshalString(dataIn, bs));
        info.setRecievedByDFBridge(bs.readBoolean());
        info.setDroppable(bs.readBoolean());

        if (bs.readBoolean()) {
            short size = dataIn.readShort();
            org.apache.activemq.apollo.openwire.command.BrokerId value[] = new org.apache.activemq.apollo.openwire.command.BrokerId[size];
            for (int i = 0; i < size; i++) {
                value[i] = (org.apache.activemq.apollo.openwire.command.BrokerId)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
            }
            info.setCluster(value);
        } else {
            info.setCluster(null);
        }
        info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
        info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));

        info.afterUnmarshall(wireFormat);

    }
View Full Code Here

Examples of org.apache.activemq.command.Message

        MessageDispatchNotification mdn = new MessageDispatchNotification();
        mdn.setConsumerId(messageDispatch.getConsumerId());
        mdn.setDeliverySequenceId(messageDispatch.getDeliverySequenceId());
        mdn.setDestination(messageDispatch.getDestination());
        if (messageDispatch.getMessage() != null) {
            Message msg = messageDispatch.getMessage();
            mdn.setMessageId(msg.getMessageId());
            sendAsyncToSlave(mdn);
        }
        super.postProcessDispatch(messageDispatch);
    }
View Full Code Here

Examples of org.apache.avro.Protocol.Message

                          + message
                          + "}}").getMessages().values().iterator().next();
  }

  @Test public void oneWay() throws Exception {
    Message m;
    // permit one-way messages w/ null resposne
    m = parseMessage("\"ack\": {"
                     +"\"request\": [],"
                     +"\"response\": \"null\","
                     +"\"one-way\": true}");
    assertTrue(m.isOneWay());
    // permit one-way messages w/o response
    m = parseMessage("\"ack\": {"
                     +"\"request\": [],"
                     +"\"one-way\": true}");
    assertTrue(m.isOneWay());
  }
View Full Code Here

Examples of org.apache.avro.test.Message

    // client
    Transceiver transceiver = new NettyTransceiver(new InetSocketAddress(
        serverPort));
    Mail proxy = (Mail) SpecificRequestor.getClient(Mail.class, transceiver);

    Message msg = new Message();
    msg.to = new Utf8("wife");
    msg.from = new Utf8("husband");
    msg.body = new Utf8("I love you!");

    try {
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.