Transcript
Page 1: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

Page 2: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

Page 3: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

Page 4: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

Page 5: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

<int:filter input-channel="inboundChannel" output-channel="outboundChannel"expression="payload.startsWith('Hello')" />

<int:filter input-channel="inboundChannel" output-channel="outboundChannel"discard-channel="relook-channel" expression="payload.startsWith('Hello')" />

Page 6: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

public class MySelector implements MessageSelector {

public boolean accept(Message<?> message) {if (message.getPayload() instanceof String

&& ((String) message.getPayload()).startsWith("Hello")) return true;

return false;}

}

Page 7: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

<int:filter input-channel="inboundChannel" output-channel="outboundChannel"ref="selector" />

<bean id="selector" class="com.intertech.MySelector" />

Page 8: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

Click here for associated labs and video

Page 9: Spring Integration Tutorial (Part 3) - Filters

Copyright © 2014 by Intertech, Inc.

http://bit.ly/1hyrViM


Recommended