org.apache.camel.component.bean
Class BeanInfo
java.lang.Object
org.apache.camel.component.bean.BeanInfo
public class BeanInfo
- extends Object
Represents the metadata about a bean type created via a combination of
introspection and annotations together with some useful sensible defaults
- Version:
- $Revision: 36321 $
Method Summary |
protected MethodInfo |
chooseMethod(Object pojo,
Exchange exchange)
Lets try choose one of the available methods to invoke if we can match
the message body to the body parameter |
protected MethodInfo |
chooseMethodWithCustomAnnotations(Exchange exchange,
Collection<MethodInfo> possibles)
|
protected MethodInfo |
chooseMethodWithMatchingBody(Exchange exchange,
Collection<MethodInfo> operationList)
|
MethodInvocation |
createInvocation(Method method,
Object pojo,
Exchange exchange)
|
MethodInvocation |
createInvocation(Object pojo,
Exchange exchange)
|
static ParameterMappingStrategy |
createParameterMappingStrategy(CamelContext camelContext)
|
protected Expression |
createParameterUnmarshalExpression(Class clazz,
Method method,
Class parameterType,
Annotation[] parameterAnnotation)
Creates an expression for the given parameter type if the parameter can
be mapped automatically or null if the parameter cannot be mapped due to
unsufficient annotations or not fitting with the default type
conventions. |
protected Expression |
createParameterUnmarshalExpressionForAnnotation(Class clazz,
Method method,
Class parameterType,
Annotation annotation)
|
CamelContext |
getCamelContext()
|
Class |
getType()
|
protected void |
introspect(Class clazz)
|
protected MethodInfo |
introspect(Class clazz,
Method method)
|
protected boolean |
isPossibleBodyParameter(Annotation[] annotations)
|
protected boolean |
isValidMethod(Class clazz,
Method method)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanInfo
public BeanInfo(CamelContext camelContext,
Class type)
BeanInfo
public BeanInfo(CamelContext camelContext,
Class type,
ParameterMappingStrategy strategy)
getType
public Class getType()
getCamelContext
public CamelContext getCamelContext()
createInvocation
public MethodInvocation createInvocation(Method method,
Object pojo,
Exchange exchange)
throws RuntimeCamelException
- Throws:
RuntimeCamelException
createInvocation
public MethodInvocation createInvocation(Object pojo,
Exchange exchange)
throws RuntimeCamelException,
AmbiguousMethodCallException
- Throws:
RuntimeCamelException
AmbiguousMethodCallException
introspect
protected void introspect(Class clazz)
introspect
protected MethodInfo introspect(Class clazz,
Method method)
chooseMethod
protected MethodInfo chooseMethod(Object pojo,
Exchange exchange)
throws AmbiguousMethodCallException
- Lets try choose one of the available methods to invoke if we can match
the message body to the body parameter
- Parameters:
pojo
- the bean to invoke a method onexchange
- the message exchange
- Returns:
- the method to invoke or null if no definitive method could be
matched
- Throws:
AmbiguousMethodCallException
chooseMethodWithMatchingBody
protected MethodInfo chooseMethodWithMatchingBody(Exchange exchange,
Collection<MethodInfo> operationList)
throws AmbiguousMethodCallException
- Throws:
AmbiguousMethodCallException
chooseMethodWithCustomAnnotations
protected MethodInfo chooseMethodWithCustomAnnotations(Exchange exchange,
Collection<MethodInfo> possibles)
throws AmbiguousMethodCallException
- Throws:
AmbiguousMethodCallException
createParameterUnmarshalExpression
protected Expression createParameterUnmarshalExpression(Class clazz,
Method method,
Class parameterType,
Annotation[] parameterAnnotation)
- Creates an expression for the given parameter type if the parameter can
be mapped automatically or null if the parameter cannot be mapped due to
unsufficient annotations or not fitting with the default type
conventions.
isPossibleBodyParameter
protected boolean isPossibleBodyParameter(Annotation[] annotations)
createParameterUnmarshalExpressionForAnnotation
protected Expression createParameterUnmarshalExpressionForAnnotation(Class clazz,
Method method,
Class parameterType,
Annotation annotation)
isValidMethod
protected boolean isValidMethod(Class clazz,
Method method)
createParameterMappingStrategy
public static ParameterMappingStrategy createParameterMappingStrategy(CamelContext camelContext)
Copyright © 2008 IONA Open Source Community. All Rights Reserved.