public abstract class AbstractCamelInvocationHandler extends Object implements InvocationHandler
Modifier and Type | Field and Description |
---|---|
protected Endpoint |
endpoint |
protected Producer |
producer |
Constructor and Description |
---|
AbstractCamelInvocationHandler(Endpoint endpoint,
Producer producer) |
Modifier and Type | Method and Description |
---|---|
protected Object |
afterInvoke(Method method,
Exchange exchange,
ExchangePattern pattern,
boolean isFuture) |
abstract Object |
doInvokeProxy(Object proxy,
Method method,
Object[] args) |
protected Throwable |
findSuitableException(Throwable cause,
Method method)
Tries to find the best suited exception to throw.
|
protected static ExecutorService |
getExecutorService(CamelContext context) |
protected static Class<?> |
getGenericType(CamelContext context,
Type type) |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
protected Object |
invokeWithBody(Method method,
Object body,
ExchangePattern pattern) |
protected boolean |
isValidMethod(Method method) |
public AbstractCamelInvocationHandler(Endpoint endpoint, Producer producer)
public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public abstract Object doInvokeProxy(Object proxy, Method method, Object[] args) throws Throwable
Throwable
protected Object invokeWithBody(Method method, Object body, ExchangePattern pattern) throws Throwable
Throwable
protected Object afterInvoke(Method method, Exchange exchange, ExchangePattern pattern, boolean isFuture) throws Exception
Exception
protected static Class<?> getGenericType(CamelContext context, Type type) throws ClassNotFoundException
ClassNotFoundException
protected static ExecutorService getExecutorService(CamelContext context)
protected Throwable findSuitableException(Throwable cause, Method method)
cause
- the caused exceptionmethod
- the methodprotected boolean isValidMethod(Method method)
Apache Camel