简体   繁体   English

m子如何调用组件?

[英]How mule invoke the component?

After go through some guides about Mule , I have a question about the component, as it is said in mule documentation, 看完有关Mule的一些指南之后,我对组件有了一个疑问,正如在Mule文档中所说的那样,

A simple POJO (Plain Old Java Object) component that will be invoked by Mule when a message is received. 一个简单的POJO(普通Java对象)组件,在收到消息时将由Mule调用。 The class or object instance to be used can be specified using a child object factory element, or via the 'class' attribute. 可以使用子对象工厂元素或通过'class'属性来指定要使用的类或对象实例。 If the 'class' attribute is used, an object factory cannot be configured as well. 如果使用“ class”属性,则也无法配置对象工厂。 Using the 'class' attribute is equivilant to using the propotype object factory ('prototype-object' child element). 使用'class'属性等同于使用原型对象工厂('prototype-object'子元素)。

in this documentation just said the component will be invoked by Mule when a message is received, but a problem is Mule how to know how many methods the component have, and which method should be invoked? 在本文档中只是说当收到消息时Mule将调用该组件,但是Mule的问题是如何知道该组件具有多少种方法,以及应该调用哪种方法? or there must one method in the component and no matter the method name? 还是组件中必须有一个方法,而无论方法名称是什么? and also mule how to deal with the parameters the method have? 还有m子如何处理该方法所具有的参数?

Alternatively, you can use: 或者,您可以使用:

<invoke object-ref="..." method="..."  methodArguments="..." />

which is way more convenient than configuring entry point resolvers. 这比配置入口点解析器更方便。

是的,我得到了答案,答案是使用m子入口点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM