Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.routing
Class MessageFilter

    java.lang.Object
      org.mule.processor.AbstractInterceptingMessageProcessor
          org.mule.processor.AbstractFilteringMessageProcessor
              org.mule.routing.MessageFilter

All Implemented Interfaces:
  InterceptingMessageProcessor, MessageProcessor, MessageSource

Direct Known Subclasses:
  ForwardingConsumer

    public class MessageFilter

extends AbstractFilteringMessageProcessor

Implementation of `InterceptingMessageProcessor` that filters message flow using a `Filter`. Is the filter accepts the message then message flow continues to the next message processor. If the filter does not accept the message processor and a message processor is configured for handling unaccepted message then this will be invoked, otherwise `null` will be returned.

EIP Reference: `http://www.eaipatterns.com/Filter.html`

Field Summary
`protected Filter` | `filter`

Fields inherited from class org.mule.processor.AbstractFilteringMessageProcessor
`throwOnUnaccepted, unacceptedMessageProcessor`

Fields inherited from class org.mule.processor.AbstractInterceptingMessageProcessor
`logger, next`

Constructor Summary
`MessageFilter()` Deprecated. Use MessageFilter(Filter filter)
`MessageFilter(Filter filter)`
`MessageFilter(Filter filter, boolean throwExceptionOnUnaccepted, MessageProcessor messageProcessor)`

Method Summary
`protected boolean` | `accept(MuleEvent event)`
`protected MuleException` | `filterUnacceptedException(MuleEvent event)`
`Filter` | `getFilter()`
`void` | `setFilter(Filter filter)`
`String` | `toString()`

Methods inherited from class org.mule.processor.AbstractFilteringMessageProcessor
`getUnacceptedMessageProcessor, handleUnaccepted, isThrowOnUnaccepted, process, setThrowOnUnaccepted, setUnacceptedMessageProcessor`

Methods inherited from class org.mule.processor.AbstractInterceptingMessageProcessor
`processNext, setListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### filter

    protected Filter filter

Constructor Detail

### MessageFilter

    public MessageFilter()

  Deprecated. Use MessageFilter(Filter filter)

  For IoC only

### MessageFilter

    public MessageFilter(Filter filter)

### MessageFilter

    public MessageFilter(Filter filter,
                         boolean throwExceptionOnUnaccepted,
                         MessageProcessor messageProcessor)

Parameters:
  `filter` -
  `throwExceptionOnUnaccepted` - throw a FilterUnacceptedException when a message is rejected by the filter?
  `messageProcessor` - used to handler unaccepted messages

Method Detail

### accept

    protected boolean accept(MuleEvent event)

  Specified by:
    `accept` in class `AbstractFilteringMessageProcessor`

### filterUnacceptedException

    protected MuleException filterUnacceptedException(MuleEvent event)

  Overrides:
    `filterUnacceptedException` in class `AbstractFilteringMessageProcessor`

### getFilter

    public Filter getFilter()

### setFilter

    public void setFilter(Filter filter)

### toString

    public String toString()

  Overrides:
    `toString` in class `AbstractInterceptingMessageProcessor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.