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

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

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

Header.<init>介绍

暂无

代码示例

代码示例来源: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: 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/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: 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: 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: org.ojbc.bundles.intermediaries/subscription-notification-service-intermediary-common

/**
 * Determine the number of subscriptions owned by the specified owner.
 * @param subscriptionOwner the federation-wide unique identifier for the person that owns the subscriptions
 * @return the count of subscriptions that person owns
 */
public int countSubscriptionsInSearch(@Header("saml_FederationID") String subscriptionOwner) {
  String sqlQuery = "select count(*) from subscription where subscriptionOwner=? and active =1";
  int subscriptionCountForOwner = this.jdbcTemplate.queryForInt(sqlQuery, new Object[] {
    subscriptionOwner
  });
  return subscriptionCountForOwner;
}

代码示例来源:origin: info.kwarc.sally4/mhw-lmh

public void compile_result(HashMap<String, Object> results, @Header("JMSCorrelationID") String texpath) {
  String logContent = (String) results.get("log");
  String logPath = texpath.substring(0, texpath.length()-3)+"ltxlog";
  log.info("writing log to "+logPath);
  OSUtils.writeFile(logPath, logContent);
}

代码示例来源:origin: info.kwarc.sally4/office-base

public HashMap<String, Object> processRequest(@Header(QueryParser.QueryMapHeader) HashMap<String, String> params) throws Exception {
  HashMap<String, Object> result = new HashMap<String, Object>();
  DocumentAnnotator annotator = callbacks.get(params.get("id"), DocumentAnnotator.class);
  if (annotator == null)
    throw new Exception("Invalid id supplied to annotationeditor");
  result.put("annotations", annotator.getAnnotationIDs());
  result.put("id", params.get("id"));
  return result;
}

代码示例来源: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: info.kwarc.sally4/office-base

public void navRequest(@Header(QueryParser.QueryMapHeader) HashMap<String, String> params) throws Exception {
  log.info("Navigating to "+params.get("id"));
  DocumentAnnotator annotator = callbacks.get(params.get("id"), DocumentAnnotator.class);
  if (annotator == null)
    throw new Exception("Invalid id supplied to annotationeditor");
  annotator.navigateTo(params.get("nid"));
}

代码示例来源:origin: com.bosch.bis.base/bis-config-beans

public String getWSReplyToHeaderValue(@Header(HEADERNAME_SOAP_HEADER_LIST) List<SoapHeader> soapHeaders) {
    if (soapHeaders != null && !soapHeaders.isEmpty()) {
      for (SoapHeader soapHeader : soapHeaders) {
        if (soapHeader.getName().getLocalPart().equals(REPLY_TO)) {
          return ((Element) soapHeader.getObject()).getTextContent();
        }
      }
    }
    return "";
  }
}

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

@Handler
public boolean checkParentMessage(@Header(MSG_HEADER) Message msg) {
  Assert.notNull(msg, "the msg must not be null");
  return msg.isParentMessage();
}

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

/**
 * Set log context parameters.
 *
 * @param message the message
 * @param requestId the request ID
 * @see LogContextHelper#setLogContextParams(Message, String)
 */
@Handler
public void setLogContextParams(@Body Message message,
    @Header(LogContextFilter.CTX_REQUEST_ID) @Nullable String requestId) {
  LogContextHelper.setLogContextParams(message, requestId);
}

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

public Order getOrder(@Header("id") String id) {
    if ("123".equals(id)) {
      Order order = new Order();
      order.setId(123);
      order.setAmount(1);
      order.setMotor("Honda");
      return order;
    } else {
      return null;
    }
  }
}

相关文章