mule框架中mule.xml标签使用介绍

<mule>
    <model name="service_xx">      ---------------------------------------------------------------------------------定义应用程序中的服务;
       <service name="GreeterUMO">     ---------------------------------------------------------------------------配置一个服务;
           <inbound....>      ------------------------------------------------------------------------------------------------配置入站路由,它们的端点以及入站转换器;
        <top:inbound-endpoint   />   ----------------------------------------------------------------------------这是服务组件接收事件的通道,它包括使用的传输器,地址,路径或资源(任何效的URI:
              <top:outbound-endpoint   />
                 <filtering-router>    ---------------------------------------------------------------------------------------这个路由使用过滤器确定消息是否匹配特定的标准;
                  <message-property-filter pattern="*******"/>    --------------------------------------------根据pattern中的条件进行信息过滤
                 </filtering-router>
      <filtering-router> 
                 <message-property-filter pattern="*******"/>   
                 </filtering-router>
       <custom-catch-all-strategy  class="路径1111">   ------------------------------------------- 过滤器方法未进行调用最后走的传输路径如同if循环中的else
            <spring:property name="" value="">   -----------------------------------------------------spring框架中键值对信息引入经过class="路径1111"传出
         </custom-catch-all-strategy>
           </inbound>
           <component>    ------------------------------------------------------------------------------------------Mule组件是通过指定实施类名配置的,Mule为组件接收的每个消息创建新的类实例
         <custom-interceptor class="" />
        <singleton-object  class="" />
        <binding interface="">    ------------------------------------------------------------------------以Component以Binding的方式在Mule中配置的一个Component,outbound属性其实是Binding了一 个vm:outbound-endpoint该Component的主要目的是因为在调用后台ESB Webservice时不需要所有的信息,ESB返回的信息也并不完整,但时给客户返回结果时需要一些请求时存储的信息 ,比如CommonMessageDTO中的备用对象TsMessageBody中的信息等,故该Component对象调用vm:outbound-endpoint后会将请求的CommonMessageDTO中的部分数据回填入作为返回的              CommonMessageDTO中。如果调用后台时发生异常,则该组件会将异常记录下来,并包装成GatewayException抛出
  <vm:outbound-endpoint  path=""  sunchronous="true||flase">
        </binding>
               </component>
   <pooled-component />    ---------------------------------------------------------------------------------Mule创建一批组件,共用组件配置,对象工厂创建一个单一的对象实例也可以指定:
           <outbound....>    -----------------------------------------------------------------------------------------------配置一个或多个出站路由,它们的端点以及出站转换器;
              .......
           </outbound>
           <default-service-exception-strategy>
              .....
            </default-service-exception-strategy>
       </service>
       <service name="GreeterUMO2" initialState="stopped">
           ...
        </service>
    </model>
</mule>

猜你喜欢

转载自blog.csdn.net/lesouls/article/details/80107500
今日推荐