Codota Logo
Headers
Code IndexAdd Codota to your IDE (free)

How to use
Headers
in
org.apache.camel

Best Java code snippets using org.apache.camel.Headers (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: OpenWiseSolutions/openhub-framework

@Handler
public void setInsertQueueTimestamp(@Headers Map<String, Object> headers) {
  headers.put(AsynchConstants.MSG_QUEUE_INSERT_HEADER, System.currentTimeMillis());
}
origin: camelinaction/camelinaction2

  public String toSql(@XPath("order/@name") String name,
            @XPath("order/@amount") int amount,
            @XPath("order/@customer") String customer,
            @Headers Map<String, Object> outHeaders) {
    outHeaders.put("partName", name);
    outHeaders.put("quantity", amount);
    outHeaders.put("customer", customer);
    return "insert into incoming_orders (part_name, quantity, customer) values (:?partName, :?quantity, :?customer)";
  }
}
origin: OpenWiseSolutions/openhub-framework

/**
 * Saves log request ID into header {@link LogContextFilter#CTX_REQUEST_ID}.
 * It's because child threads don't inherits this information from parent thread automatically.
 *
 * @param msg the message
 * @param headers the incoming message headers
 */
@Handler
public void saveLogContextParams(@Body Message msg, @Headers Map<String, Object> headers) {
  // request ID should be set from LogContextFilter#initContext
  Map contextMap = MDC.getCopyOfContextMap();
  String requestId = null;
  if (contextMap != null && contextMap.get(LogContextFilter.CTX_REQUEST_ID) != null) {
    requestId = (String) contextMap.get(LogContextFilter.CTX_REQUEST_ID);
    headers.put(LogContextFilter.CTX_REQUEST_ID, requestId);
  }
  LogContextHelper.setLogContextParams(msg, requestId);
}
origin: OpenWiseSolutions/openhub-framework

/**
 * Sets {@link AsynchConstants#OBJECT_ID_HEADER} and {@link AsynchConstants#ENTITY_TYPE_HEADER}
 * headers if there are available corresponding values in message.
 *
 * @param msg the message
 * @param headers the headers
 */
@Handler
public void setEntityInfo(@Body Message msg, @Headers Map<String, Object> headers) {
  Assert.notNull(msg, "the msg must not be null");
  if (msg.getObjectId() != null) {
    headers.put(OBJECT_ID_HEADER, msg.getObjectId());
  }
  if (msg.getEntityType() != null) {
    headers.put(ENTITY_TYPE_HEADER, msg.getEntityType());
  }
}
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;
}
org.apache.camelHeaders

Most used methods

  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • onCreateOptionsMenu (Activity)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now