Audio signal analysis with filter by using FIR filter and ...
And Filter
-
Upload
sivachandra-mandalapu -
Category
Education
-
view
72 -
download
0
Transcript of And Filter
And Filter
Abstract
The main motto of this PPT is How to use And Filter in our applications.
Introduction
Mule bundles more than a dozen Filters that determine whether a message can proceed through an application flow. The simplest filters implement basic logic operators (such as and, or, and not), but these simple elements can be combined in various ways to specify complex logical conditions.
Example
.mflow<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsdhttp://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsdhttp://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd"> <flow name="AndFilterFlow1" doc:name="AndFilterFlow1"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" path="andfilter" doc:name="HTTP"/> <logger message="--entered into the flow" level="INFO" doc:name="Logger"/> <set-payload value="<Soap-Env><Body><Path>mulesoft</Path></Body></Soap-Env>" doc:name="Set Payload"/> <and-filter doc:name="And"> <expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('mule')]"/> <expression-filter expression="#[xpath('/Soap-Env/Body/Path/text()').text.contains('soft')]"/> </and-filter> <logger message="--Success" level="INFO" doc:name="Logger"/> </flow></mule>
Output:INFO 2015-12-12 06:49:37,897 [main] org.mule.DefaultMuleContext: *********************************************************************** Application: AndFilter ** OS encoding: Cp1252, Mule encoding: UTF-8 ** ** Agents Running: ** Clustering Agent ** JMX Agent ***********************************************************************INFO 2015-12-12 06:49:37,898 [main] org.mule.module.launcher.MuleDeploymentService: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Started app 'AndFilter' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++INFO 2015-12-12 06:49:41,558 [[AndFilter].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --entered into the flowINFO 2015-12-12 06:49:42,214 [[AndFilter].connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor: --Success
Flow of execution:1. URL to trigger the service from browserhttp://localhost:8089/andfilter 2. AND filter checks whether the request contains ‘mule’ and ‘soft’ or not?, if yes, it will print a message ‘Success’, else it will not go further.
References
https://docs.mulesoft.com/mule-user-guide/v/3.7/filters