class NotificationCenter {

    public static void notify(EventCatalog event, ResponseWrapper response) {
        for (TaskExecutor tasker : NotificationCenter.getSubscriberList(event)) {
            switch (response.getType()) {
                case SUCCESS:
                    tasker.executeOnSuccessTask(response.getPayload());
                    break;
                case ERROR:
                    tasker.executeOnErrorTask(response.getPayload());
                    break;
            }
        }
    }

}