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

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


    }
    return null;
  }

  public IExchange toExchange(CompositeData data) {
    Message message = new Message();
    Map<String, Object> headers = message.getHeaders();
    Set<String> keySet = data.getCompositeType().keySet();
    for (String key : keySet) {
      Object value = data.get(key);
      // ActiveMQJMXPlugin.getLogger().debug("Key: " + key + " value " + value);
      if (ignoredKeys.contains(key)) {
        continue;
      }
      boolean nestedProperty = nestedProperties.contains(key);
      if (nestedProperty && value instanceof TabularData) {
        TabularData td = (TabularData) value;
        Map<String, Object> map = toMap(td);
        putAllNonNull(headers, map);
      } else if (nestedProperty && value instanceof Map) {
        Map<String, Object> map = (Map<String, Object>) value;
        putAllNonNull(headers, map);
      } else if (bodyKeys.contains(key)) {
        message.setBody(value);
      } else if (value != null) {
        headers.put(key, value);
      }
    }
    Set<Entry<String, Object>> entrySet = headers.entrySet();
View Full Code Here


    } else {

      // TODO deal with binary....
      File file = IFiles.toFile(resource);
      if (file != null) {
        Message m = new Message();
        message = m;

        setMessageBody(m, file, !IFiles.isTextContentType(resource));
        // TODO should we add MIME type and whatnot headers...

       
        if (contentDescription != null) {
          IContentType contentType = contentDescription.getContentType();
          if (contentType != null) {
            m.setHeader("EclipseContentType", contentType.getId());
          }
        }
      } else {
        message = null;
      }
View Full Code Here

TOP

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

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.