org.springframework.integration.message.selector
Class PayloadTypeSelector

java.lang.Object
  extended by org.springframework.integration.message.selector.PayloadTypeSelector
All Implemented Interfaces:
MessageSelector

public class PayloadTypeSelector
extends java.lang.Object
implements MessageSelector

A MessageSelector implementation that checks the type of the Message payload. The payload type must be assignable to at least one of the selector's accepted types.

Author:
Mark Fisher

Field Summary
private  java.util.List<java.lang.Class<?>> acceptedTypes
           
 
Constructor Summary
PayloadTypeSelector(java.lang.Class<?>... types)
          Create a selector for the provided types.
 
Method Summary
 boolean accept(Message<?> message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

acceptedTypes

private java.util.List<java.lang.Class<?>> acceptedTypes
Constructor Detail

PayloadTypeSelector

public PayloadTypeSelector(java.lang.Class<?>... types)
Create a selector for the provided types. At least one is required.

Method Detail

accept

public boolean accept(Message<?> message)
Specified by:
accept in interface MessageSelector