Package org.fusesource.ide.jmx.commons.messages

Examples of org.fusesource.ide.jmx.commons.messages.IExchange


    List<IExchange> answer = new ArrayList<IExchange>();
    try {
      CompositeData[] cds = queue.browse();
      if (cds != null) {
        for (CompositeData cd : cds) {
          IExchange exchange = converter.toExchange(cd);
          if (exchange != null) {
            answer.add(exchange);
          }
        }
      }
View Full Code Here


      if (stepList == null) {
        stepList = new ExchangeStepList(exchangeId);
        stepLists.add(stepList);
        stepListMap.put(exchangeId, stepList);
      }
      IExchange exchange = stepList.addExchange(traceMessage);
      String toNode = traceMessage.getToNode();
      if (exchange != null && toNode != null) {
        INodeStatistics nodeStats = getNodeStats(toNode);
        nodeStats.addExchange(exchange);
      }
View Full Code Here

      if (stepList == null) {
        stepList = new ExchangeStepList(exchangeId);
        stepLists.add(stepList);
        stepListMap.put(exchangeId, stepList);
      }
      IExchange exchange = stepList.addExchange(traceMessage);
      String toNode = traceMessage.getToNode();
      if (exchange != null && toNode != null) {
        INodeStatistics nodeStats = getNodeStats(toNode);
        nodeStats.addExchange(exchange);
      }
View Full Code Here

    public List<IExchange> getExchangeList() {
      return exchangeList;
    }

    public IExchange addExchange(BacklogTracerEventMessage traceMessage) throws JAXBException, SAXException {
      IExchange answer = createExchange(traceMessage);
      if (answer != null) {
//        answer.getIn().setExchangeIndex(exchangeList.size() + 1);
        exchangeList.add(answer);
      }
      // remember the uuid of this iexchange
View Full Code Here

    if (showBody) {
      final Function1 function = new Function1() {
        @Override
        public Object apply(Object element) {
          if (element instanceof IExchange) {
            IExchange exchange = (IExchange) element;
            String answer = MessageUIHelper.getBody(exchange);
            if (answer != null) {
              // lets replace newlines
              return answer.replace('\n', ' ');
            }
          }
          return null;
        }
      };
      column = addColumnFunction(bounds, column, function, "Message Body");
    }

    SortedSet<String> headers = new TreeSet<String>();
    for (IExchange exchange : exchanges) {
      IMessage in = exchange.getIn();
      if (in != null) {
        headers.addAll(in.getHeaders().keySet());
      }
    }
    for (final String header : headers) {
      final Function1 function = new Function1() {
        @Override
        public Object apply(Object element) {
          if (element instanceof IExchange) {
            IExchange exchange = (IExchange) element;
            IMessage in = exchange.getIn();
            if (in != null) {
              return in.getHeaders().get(header);
            }
          }
          return null;
View Full Code Here

TOP

Related Classes of org.fusesource.ide.jmx.commons.messages.IExchange

Copyright © 2018 www.massapicom. 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.