class AbstractStateCompositeProcessor implements MailProcessor, Configurable {

    @PreDestroy
    public void dispose() {
        String[] names = getProcessorStates();
        for (String name : names) {
            MailProcessor processor = getProcessor(name);
            if (processor instanceof AbstractStateMailetProcessor) {
                ((AbstractStateMailetProcessor) processor).destroy();
            }

        }

        if (jmxListener != null) {
            jmxListener.dispose();
        }
    }

}