package click.kamil.examples.jmsabstract;

import org.springframework.jms.annotation.JmsListener;

/**
 * Template-method JMS base: {@code @JmsListener} lives on the abstract type; subclasses
 * implement {@link #doPMessage(String)}.
 */
public abstract class AbstractAA {

    @JmsListener(destination = "orders.commands")
    public void onMessage(String message) {
        processMessage(message);
    }

    protected void processMessage(String message) {
        doPMessage(message);
    }

    protected abstract void doPMessage(String message);
}
