org.apache.camel.Header类的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.9k)|赞(0)|评价(0)|浏览(132)

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

Header介绍

暂无

代码示例

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

/**
 * Changes state of the message to {@link MsgStateEnum#WAITING} - only if the message hasn't been already processed.
 *
 * @param msg the message
 */
void setStateWaiting(@Header(MSG_HEADER) Message msg);

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

/**
 * Changes state of the message to {@link MsgStateEnum#PARTLY_FAILED} but without increasing error count.
 *
 * @param msg the message
 */
void setStatePartlyFailedWithoutError(@Header(MSG_HEADER) Message msg);

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

/**
 * Inserts new failed confirmation.
 *
 * @param msg the message
 * @return creates {@link ExternalCall}
 */
ExternalCall insertFailedConfirmation(@Header(AsynchConstants.MSG_HEADER) Message msg);

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

/**
 * Changes state of the message to {@link MsgStateEnum#POSTPONED}.
 *
 * @param msg the message
 */
void setStatePostponed(@Header(MSG_HEADER) Message msg);

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

/**
 * Confirms that the message was fully processed.
 * The message must have a final {@link Message#getState() state},
 * that is either {@link MsgStateEnum#OK} or {@link MsgStateEnum#FAILED}.
 *
 * @param msg the message
 */
void confirm(@Header(AsynchConstants.MSG_HEADER) Message msg);

代码示例来源:origin: funktionio/funktion-connectors

/**
 * The method used as funktion
 *
 * @param body  the message body
 * @param name  the header with the key name
 * @return the response from the funktion
 */
public Object cheese(String body, @Header("name") String name) {
  return "Hello " + name + ". I got payload `" + body + "` and I am on host: " + System.getenv("HOSTNAME");
}

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

public String checkStatus(@Header("id") String id) throws Exception {
    if ("123".equals(id)) {
      return "Processing";
    }
    return "Complete";
  }
}

代码示例来源:origin: org.ojbc.bundles.shared/ojb-fedquery-common

/**
 * This method will remove a reply to address enty from the map based on a message ID
 * 
 * @param messageID
 */

public void removeReplyToAddress(@Header(value = "federatedQueryRequestGUID")String messageID)
{
  replyToMap.remove(messageID);
}

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

/**
 * Search for subscriptions by the person who owns them.
 * @param subscriptionOwner the federation-wide unique identifier for the person that owns the subscriptions
 * @return the list of matching subscription objects
 */
public List<Subscription> searchForSubscriptionsBySubscriptionOwner(@Header("saml_FederationID") String subscriptionOwner) {
  String sqlQuery = BASE_QUERY_STRING + " and s.subscriptionOwner=? and s.active =1";
  List<Subscription> subscriptions = this.jdbcTemplate.query(sqlQuery, new Object[] {
    subscriptionOwner
  }, resultSetExtractor);
  return subscriptions;
}

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

public void removeItem(@Header("sessionId") String sessionId, @Header("itemId") String itemId) {
  LOG.info("removeItem {} {}", sessionId, itemId);
  Set<CartDto> dtos = content.get(sessionId);
  if (dtos != null) {
    dtos.remove(itemId);
  }
}

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

public String combine(@Header("ERP") String erp, @Header("CRM") String crm, @Header("SHIPPING") String shipping) {
    StringBuilder sb = new StringBuilder("Customer overview");
    sb.append("\nERP: " + erp);
    sb.append("\nCRM: " + crm);
    sb.append("\nSHIPPING: " + shipping);
    return sb.toString();
  }
}

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

public String combine(@Header("ERP") String erp, @Header("CRM") String crm, @Header("SHIPPING") String shipping) {
    StringBuilder sb = new StringBuilder("Customer overview");
    sb.append("\nERP: " + erp);
    sb.append("\nCRM: " + crm);
    sb.append("\nSHIPPING: " + shipping);
    return sb.toString();
  }
}

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

public Set<CartDto> getItems(@Header("sessionId") String sessionId) {
    LOG.info("getItems {}", sessionId);
    Set<CartDto> answer = content.get(sessionId);
    if (answer == null) {
      answer = Collections.EMPTY_SET;
    }
    return answer;
  }
}

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

public Set<CartDto> getItems(@Header("sessionId") String sessionId) {
    LOG.info("getItems {}", sessionId);
    Set<CartDto> answer = content.get(sessionId);
    if (answer == null) {
      answer = Collections.emptySet();
    }
    return answer;
  }
}

代码示例来源:origin: org.ojbc.bundles.shared/ojb-fedquery-common

/**
 * This method will set the 'WSAddressingReplyTo' Camel header by using the messageID as the key.
 * 
 * @param exchange
 * @param messageID
 */
public void getReplyToAddress(Exchange exchange, @Header(value = "federatedQueryRequestGUID")String messageID)
{
  exchange.getIn().setHeader("WSAddressingReplyTo", replyToMap.get(messageID));
}

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

public void insertAuditLog(String order, @Header("JMSRedelivered") boolean redelivery) throws Exception {
  // using old-school JdbcTemplate to perform a SQL operation from Java code with spring-jdbc
  JdbcTemplate jdbc = new JdbcTemplate(dataSource);
  String orderId = "" + ++counter;
  String orderValue = order;
  String orderRedelivery = "" + redelivery;
  jdbc.execute(String.format("insert into bookaudit (order_id, order_book, order_redelivery) values ('%s', '%s', '%s')",
      orderId, orderValue, orderRedelivery));
}

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

public void hint(
    @Header("needURI")final String needURI,
    @Header("otherNeedURI") final String  otherNeedURI,
    @Header("score")final String score,
    @Header("originator")final String originator,
    @Header("content") final String content,
    @Header("wonMessage") final String wonMessage)
   throws Exception {
 delegate.hint(URI.create(needURI), URI.create(otherNeedURI),
     Double.valueOf(score), URI.create(originator),
     RdfUtils.toModel(content), WonMessageDecoder.decode(Lang.TRIG, wonMessage));
}

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

public void removeItem(@Header("sessionId") String sessionId, @Header("itemId") String itemId) {
  LOG.info("removeItem {} {}", sessionId, itemId);
  Set<CartDto> dtos = content.get(sessionId);
  if (dtos != null) {
    dtos.removeIf(i -> i.getItemId() == itemId);
  }
}

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

public void needActivated(@Header("wonNodeURI") final String wonNodeURI,
             @Header("needURI") final String needURI) {
 logger.debug("need activated message received: {}", needURI);
 delegate.onNeedActivated(URI.create(wonNodeURI), URI.create(needURI));
}
public void needDeactivated(@Header("wonNodeURI") final String wonNodeURI,

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

public void needDeactivated(@Header("wonNodeURI") final String wonNodeURI,
              @Header("needURI") final String needURI) {
 logger.debug("need deactivated message received: {}", needURI);
 delegate.onNeedDeactivated(URI.create(wonNodeURI), URI.create(needURI));
}

相关文章