KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > providers > http > filters > HttpRequestWildcardFilter


1 /*
2  * $Id: HttpRequestWildcardFilter.java 4219 2006-12-09 10:15:14Z lajos $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.providers.http.filters;
12
13 import org.mule.providers.http.HttpConnector;
14 import org.mule.routing.filters.WildcardFilter;
15 import org.mule.umo.UMOMessage;
16
17 /**
18  * <code>HttpRequestWildcardFilter</code> filters out wildcard URL expressions. You
19  * can use a comma-separated list of URL patterns such as "*.gif, *blah*".
20  */

21 public class HttpRequestWildcardFilter extends WildcardFilter
22 {
23
24     public HttpRequestWildcardFilter()
25     {
26         super();
27     }
28
29     public HttpRequestWildcardFilter(String JavaDoc pattern)
30     {
31         super(pattern);
32     }
33
34     public boolean accept(Object JavaDoc object)
35     {
36         if (object instanceof UMOMessage)
37         {
38             object = ((UMOMessage)object).getProperty(HttpConnector.HTTP_REQUEST_PROPERTY);
39         }
40
41         return super.accept(object);
42     }
43
44 }
45
Popular Tags