Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
HttpRequestWildcardFilter |
|
| 1.3333333333333333;1.333 |
1 | /* | |
2 | * $Id: HttpRequestWildcardFilter.java 7963 2007-08-21 08:53:15Z dirk.olmes $ | |
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 CPAL v1.0 | |
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 | 0 | super(); |
27 | 0 | } |
28 | ||
29 | public HttpRequestWildcardFilter(String pattern) | |
30 | { | |
31 | 0 | super(pattern); |
32 | 0 | } |
33 | ||
34 | public boolean accept(Object object) | |
35 | { | |
36 | 0 | if (object instanceof UMOMessage) |
37 | { | |
38 | 0 | object = ((UMOMessage) object).getProperty(HttpConnector.HTTP_REQUEST_PROPERTY); |
39 | } | |
40 | ||
41 | 0 | return super.accept(object); |
42 | } | |
43 | ||
44 | } |