原文地址: http://camel.apache.org/bean-integration.html
Camel支持多种方式的对beans和POJO类的集成。
1)Bean绑定 (Bean Binding)
当Camel调用一个Bean方法时,不管是通过Bean组件,Spring远程服务(Spring Remoting)或者POJO Consuming,Bean绑定机制都会用于指定调用的具体方法(在没有显式指定的情况下),并确定怎么将消息绑定到具体参数,这个过程可能使用参数绑定标注(Parameter Binding Annotations)实现。
2)标注 (Annotations)
如果一个Bean是由Spring XML定义,或者使用Spring 2.5的组件扫描机制(component scanning mechanism)扫描得到,并且其中使用了<camelContext>或CamelBeanPostProcessor,那么我们可以借助于大量Camel标注,来提供一些服务支持,比如注入资源或者生产、消息或路由消息。
-
POJO Consuming 用于消费消息,也有时会路由消息;
-
POJO Producing 用于简化从POJO类中生产Camel消息的过程;
-
RecipientList Annotation 用于从POJO类方法中创建接收列表(Recipient List);
-
Bean Injection 用于将Camel相关的资源注入到POJO类中;
-
Using Exchange Pattern Annotation 描述了模型标注(pattern annotations)怎样借助于Spring远程服务或POJO Producing改变方法调用行为的。
3)Spring远程服务 (Spring Remoting)
Camel支持Spring远程服务提供组件,它可以使用Camel作为底层传输机制。这种方式的好处是我们可以使用任意的Camel传输组件进行beans间的通信。同样意味着我们可以在beans间使用基于内容的路由器(Content Based Router)和其他企业集成模式(Enterprise Integration Patterns);尤其是使用消息转换器(Message Translator)来转换传输中的消息的样式,甚至为消息添加各种各样的头等等。
4)Bean组件 (Bean Component)
Bean组件支持对一个Java接口创建代理;而实现方式仅仅需要发送一条包含有BeanInvocation信息的消息到Camel接入点上(endpoint)。
而后,服务端的实现会处理这条消息,使用Bean绑定来把消息绑定到调用方法上,绑定的过程会传入相应的参数。
分享到:
相关推荐
8: Enterprise Integration Patterns - AVAILABLE Part 3 Out in the Wild 9: Using Transactions - AVAILABLE 10: Concurrency - AVAILABLE 11: Developing Camel Projects - AVAILABLE 12: Monitoring and ...
Apache Camel is a Spring based Integration Framework which implements the Enterprise Integration Patterns with powerful Bean Integration. Camel lets you create the Enterprise Integration Patterns
Apache Camel provides support for Bean Binding and seamless integration with popular frameworks such as CDI, Spring, Blueprint and Guice. Camel also has extensive support for unit testing your routes.
是基于已知的Enterprise Integration Patterns和功能强大的bean集成的功能强大的开源集成框架。 介绍 该项目为Apache Camel提供Spring Boot支持。 创建/删除启动器 要为zoot组件创建启动器,请运行以下命令: ./...
Apache Camel Karaf支持 是基于已知的Enterprise Integration Patterns和功能强大的bean集成的功能强大的开源集成框架。 介绍 该项目为Apache Camel提供Karaf支持。
Camel in Action is a Camel tutorial full of small examples showing how to work with the integration patterns. It starts with core concepts like sending, receiving, routing, and transforming data. It ...
Apache Camel is a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration.
使用内存中的Apache Derby关系数据库作为数据源,该用例可以轻松更新以连接到任何关系数据库(请参阅camel-context.xml中Oracle的注释bean钩子)。 此外,使用Swagger记录了REST API。 该项目利用了侦听端口8080上...
ca原始Java 阿帕奇骆驼 是一个功能强大的开源集成框架,基于流行的Enterprise Integration Patterns和功能强大的bean集成。 介绍 Camel支持创建Enterprise Integration ...Camel具有强大的Bean绑定,并与流
是一个强大的开源集成框架,基于流行的Enterprise Integration Patterns和功能强大的bean集成。 介绍 Camel支持创建Enterprise Integration Patterns,以通过基于Spring或Blueprint的Xml Configuration文件,或者...