org.apache.camel.Body.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中org.apache.camel.Body.<init>()方法的一些代码示例,展示了Body.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.<init>()方法的具体详情如下:
包路径:org.apache.camel.Body
类名称:Body
方法名:<init>

Body.<init>介绍

暂无

代码示例

代码示例来源:origin: vert-x3/vertx-examples

/**
 * Accepts only release announce.
 */
public boolean isRelease(@Body SyndFeed feed) {
 SyndEntry firstEntry = (SyndEntry) feed.getEntries().get(0);
 return firstEntry.getTitle().toLowerCase().contains("release");
}

代码示例来源:origin: camelinaction/camelinaction2

public void addItem(@Header("sessionId") String sessionId, @Body CartDto dto) {
  LOG.info("addItem {} {}", sessionId, dto);
  Set<CartDto> dtos = content.get(sessionId);
  if (dtos == null) {
    dtos = new LinkedHashSet<>();
    content.put(sessionId, dtos);
  }
  dtos.add(dto);
}

代码示例来源:origin: camelinaction/camelinaction2

public void addItem(@Header("sessionId") String sessionId, @Body CartDto dto) {
  LOG.info("addItem {} {}", sessionId, dto);
  Set<CartDto> dtos = content.get(sessionId);
  if (dtos == null) {
    dtos = new LinkedHashSet<>();
    content.put(sessionId, dtos);
  }
  dtos.add(dto);
}

代码示例来源:origin: camelinaction/camelinaction

public Document handleIncomingOrder(@Body Document xml,
                  @XPath("/order/@customerId") int customerId,
                  @Bean(ref = "guid", method = "generate") int orderId) {
  Attr attr = xml.createAttribute("orderId");
  attr.setValue("" + orderId);
  Node node = xml.getElementsByTagName("order").item(0);
  node.getAttributes().setNamedItem(attr);
  return xml;
}

代码示例来源:origin: io.syndesis.integration/integration-runtime

@SuppressWarnings("PMD.UseLocaleWithCaseConversions")
  public String myProcessor(@Body String body) {
    return body.toUpperCase();
  }
}

代码示例来源:origin: apache/servicemix

@Handler
  public Map getProcessVariables(@Body String body,
                  @Header(Exchange.FILE_NAME) String filename,
                  @Simple("${date:now:yyyy-MM-dd kk:mm:ss}") String timestamp) {
    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("message", body);
    variables.put("orderid", filename);
    variables.put("timestamp", timestamp);
    return variables;
  }
}

代码示例来源:origin: io.syndesis/integration-component-proxy

@SuppressWarnings("PMD.UseLocaleWithCaseConversions")
  public String process(@Body String body) {
    return body.toUpperCase();
  }
}

代码示例来源:origin: org.ojbc.bundles.intermediaries/subscription-notification-service-intermediary-common

public String createCamelEmail(Exchange in, @Body ExpiringSubscriptionEmail expiringSubscriptionEmail)
{
  in.getIn().setHeader("to", expiringSubscriptionEmail.getTo());
  in.getIn().setHeader("subject", expiringSubscriptionEmail.getSubject());
  
  return expiringSubscriptionEmail.getMessageBody();
}

代码示例来源:origin: io.syndesis.integration/integration-runtime

public String process(@Body String body) {
    return body.toUpperCase();
  }
}

代码示例来源:origin: camelinaction/camelinaction

public Document handleIncomingOrder(@Body Document xml,
                  @XPath(value = "/c:order/@customerId", 
                      namespaces = @NamespacePrefix(
                        prefix = "c",
                        uri = "http://camelinaction.com/order")) int customerId,
                  @Bean(ref = "guid", method = "generate") int orderId) {
  Attr attr = xml.createAttribute("orderId");
  attr.setValue("" + orderId);
  Node node = xml.getElementsByTagName("order").item(0);
  node.getAttributes().setNamedItem(attr);
  return xml;
}

代码示例来源:origin: OpenWiseSolutions/openhub-framework

@Handler
public void setMsgPriority(@Body Message msg) {
  // new messages will be processed earlier then PARTLY_FAILED or POSTPONED messages
  msg.setProcessingPriority(NEW_MSG_PRIORITY);
}

代码示例来源:origin: OpenWiseSolutions/openhub-framework

/**
   * Splits specified message into smaller messages.
   *
   * @param parentMsg the parent message
   * @param body the body
   */
  @Handler
  void splitMessage(@Header(AsynchConstants.MSG_HEADER) Message parentMsg, @Body Object body);
}

代码示例来源:origin: at.researchstudio.sat/won-matcher

public void needCreated(@Header("wonNodeURI") final String wonNodeURI,
            @Header("needURI") final String needURI,
            @Body final String content) {
  logger.debug("new need received: {} with content {}", needURI, content);
  delegate.onNewNeed(URI.create(wonNodeURI), URI.create(needURI), RdfUtils.toDataset(content));
}
public void needActivated(@Header("wonNodeURI") final String wonNodeURI,

代码示例来源:origin: io.syndesis.integration/integration-runtime

@Handler
  public String apply(@Body String body) {
    return "Hello " + body;
  }
}

代码示例来源:origin: io.syndesis.integration/integration-runtime

@Handler
  public void handle(@Body String body) {
    // NO-OP
  }
}

代码示例来源:origin: io.syndesis.integration/integration-runtime

@Handler
  public String[] apply(@Body String body) {
    return new String[]{ "Hiram", "World" };
  }
}

代码示例来源:origin: OpenWiseSolutions/openhub-framework

@Handler
  public SyncHelloResponse composeGreeting(@Body SyncHelloRequest req) {
    Assert.notNull(req, "req must not be null");

    String greeting = "Hello " + req.getName();

    SyncHelloResponse res = new SyncHelloResponse();
    res.setGreeting(greeting);
    return res;
  }
}

代码示例来源:origin: io.syndesis.integration/integration-runtime

@Handler
  public int apply(@Body String body) {
    return body.hashCode();
  }
}

代码示例来源:origin: io.syndesis.integration-runtime/runtime

@Handler
  public String configure(@Body String body, @Header("ExtensionHeader") String header) {
    return String.join("-", body, header, message);
  }
}

代码示例来源:origin: ru.yandex.qatools.camelot/camelot-commons

public boolean filter(@Body Object input, @Headers Map<String, Object> headers) {
  final Object body = process(input, headers);
  try {
    CustomFilter filter = (CustomFilter) customFilterClass.newInstance();
    plugin.getContext().getInjector().inject(filter, plugin.getContext());
    return body != null && filter.filter(body);
  } catch (Exception e) {
    logger.warn("Failed to instantiate the filter class for plugin " + plugin.getId(), e);
  }
  return false;
}

相关文章