// Path: spring-integration-aws/src/main/java/org/springframework/integration/aws/MessageMarshaller.java
// public interface MessageMarshaller {
// 
// 	/**
// 	 * Converts a Message to a String.
// 	 * 
// 	 * @param message
// 	 * @return serialized string
// 	 * @throws MessageMarshallerException
// 	 */
// 	String serialize(Message<?> message) throws MessageMarshallerException;
// 
// 	/**
// 	 * Converts input String to Message.
// 	 * 
// 	 * @param input
// 	 * @return Message
// 	 * @throws MessageMarshallerException
// 	 */
// 	Message<?> deserialize(String input) throws MessageMarshallerException;
// }
// 
// Path: spring-integration-aws/src/main/java/org/springframework/integration/aws/MessageMarshallerException.java
// public class MessageMarshallerException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public MessageMarshallerException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public MessageMarshallerException(String message) {
// 		super(message);
// 	}
// 
// }


import org.springframework.integration.Message;
import org.springframework.integration.MessagingException;
import org.springframework.integration.aws.MessageMarshaller;
import org.springframework.integration.aws.MessageMarshallerException;
package org.springframework.integration.aws.sns.core;


public abstract class NotificationHandler {

	private MessageMarshaller messageMarshaller;

	public void setMessageMarshaller(MessageMarshaller messageMarshaller) {
		this.messageMarshaller = messageMarshaller;
	}

	public void onNotification(String notification) {

		try {
			dispatch(messageMarshaller.deserialize(notification));

// Path: spring-integration-aws/src/main/java/org/springframework/integration/aws/MessageMarshaller.java
// public interface MessageMarshaller {
// 
// 	/**
// 	 * Converts a Message to a String.
// 	 * 
// 	 * @param message
// 	 * @return serialized string
// 	 * @throws MessageMarshallerException
// 	 */
// 	String serialize(Message<?> message) throws MessageMarshallerException;
// 
// 	/**
// 	 * Converts input String to Message.
// 	 * 
// 	 * @param input
// 	 * @return Message
// 	 * @throws MessageMarshallerException
// 	 */
// 	Message<?> deserialize(String input) throws MessageMarshallerException;
// }
// 
// Path: spring-integration-aws/src/main/java/org/springframework/integration/aws/MessageMarshallerException.java
// public class MessageMarshallerException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public MessageMarshallerException(String message, Throwable cause) {
// 		super(message, cause);
// 	}
// 
// 	public MessageMarshallerException(String message) {
// 		super(message);
// 	}
// 
// }


// Path: spring-integration-aws/src/main/java/org/springframework/integration/aws/sns/core/NotificationHandler.java
import org.springframework.integration.Message;
import org.springframework.integration.MessagingException;
import org.springframework.integration.aws.MessageMarshaller;
import org.springframework.integration.aws.MessageMarshallerException;

package org.springframework.integration.aws.sns.core;


public abstract class NotificationHandler {

	private MessageMarshaller messageMarshaller;

	public void setMessageMarshaller(MessageMarshaller messageMarshaller) {
		this.messageMarshaller = messageMarshaller;
	}

	public void onNotification(String notification) {

		try {
			dispatch(messageMarshaller.deserialize(notification));

		} catch (MessageMarshallerException e) {