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

How to use
InvalidPayloadRuntimeException
in
org.apache.camel

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: org.apache.camel/camel-elasticsearch-rest

  @Override
  public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
    // Don't use getBody(Class<T>) here as we don't want to coerce the body type using a type converter.
    Object objBody = newExchange.getIn().getBody();
    if (!(objBody instanceof DocWriteRequest[])) {
      throw new InvalidPayloadRuntimeException(newExchange, DocWriteRequest[].class);
    }

    DocWriteRequest[] newBody = (DocWriteRequest[]) objBody;
    BulkRequest request;
    if (oldExchange == null) {
      request = new BulkRequest();
      request.add(newBody);
      newExchange.getIn().setBody(request);
      return newExchange;
    } else {
      request = oldExchange.getIn().getBody(BulkRequest.class);
      request.add(newBody);
      return oldExchange;
    }
  }
}
origin: org.apache.camel/camel-jpa

  public Object evaluate(Exchange exchange) {
    Object answer;
    // must have a body
    try {
      if (getEntityType() == null) {
        answer = exchange.getIn().getMandatoryBody();
      } else {
        answer = exchange.getIn().getMandatoryBody(getEntityType());
      }
    } catch (InvalidPayloadException e) {
      throw new InvalidPayloadRuntimeException(exchange, getEntityType(), e.getCause());
    }
    // is never null
    return answer;
  }
};
origin: org.apache.camel/camel-cm-sms

throw new InvalidPayloadRuntimeException(exchange, SMSMessage.class);
org.apache.camelInvalidPayloadRuntimeException

Most used methods

  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (Timer)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getExternalFilesDir (Context)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Collectors (java.util.stream)
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