Class AbstractCamelInvocationHandler

    • Field Detail

      • endpoint

        protected final org.apache.camel.Endpoint endpoint
      • producer

        protected final org.apache.camel.Producer producer
    • Constructor Detail

      • AbstractCamelInvocationHandler

        public AbstractCamelInvocationHandler​(org.apache.camel.Endpoint endpoint,
                                              org.apache.camel.Producer producer)
    • Method Detail

      • afterInvoke

        protected Object afterInvoke​(Method method,
                                     org.apache.camel.Exchange exchange,
                                     org.apache.camel.ExchangePattern pattern,
                                     boolean isFuture)
                              throws Exception
        Throws:
        Exception
      • getExecutorService

        protected static ExecutorService getExecutorService​(org.apache.camel.CamelContext context)
      • findSuitableException

        protected Throwable findSuitableException​(Throwable cause,
                                                  Method method)
        Tries to find the best suited exception to throw.

        It looks in the exception hierarchy from the caused exception and matches this against the declared exceptions being thrown on the method.

        Parameters:
        cause - the caused exception
        method - the method
        Returns:
        the exception to throw, or null if not possible to find a suitable exception
      • isValidMethod

        protected boolean isValidMethod​(Method method)