package com.bcxin.Infrastructures.events.handlers;

import com.bcxin.Infrastructures.events.DomainEventAbstract;
import org.springframework.context.ApplicationListener;

public abstract class DomainEventHandlerAbstract<T extends DomainEventAbstract> implements ApplicationListener<T> {
    @Override
    public void onApplicationEvent(T event) {
        execute(event);
    }

    protected abstract void execute(T event);
}
