Package org.springframework.integration

Examples of org.springframework.integration.MessageRejectedException


    public void handleMessage(Message<?> message) {
        Class<?> eventType = message.getPayload().getClass();
        if (filter.accept(eventType)) {
            eventBus.publish(new GenericEventMessage(message.getPayload(), message.getHeaders()));
        } else {
            throw new MessageRejectedException(message, String.format(
                    "The event of type [%s] was blocked by the filter.",
                    eventType.getSimpleName()));
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.integration.MessageRejectedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.