class LockOutEventDispatcher {
    private static final Logger Log = LoggerFactory.getLogger(LockOutEventDispatcher.class);

    private static List<LockOutEventListener> listeners =
            new CopyOnWriteArrayList<>();

    /**
     * Registers a listener to receive events.
     *
     * @param listener the listener.
     */
    public static void addListener(LockOutEventListener listener) {
        if (listener == null) {
            throw new NullPointerException();
        }
        listeners.add(listener);
    }

    /**
     * Unregisters a listener to receive events.
     *
     * @param listener the listener.
     */
    public static void removeListener(LockOutEventListener listener) {
        listeners.remove(listener);
    }

    /**
     * Notifies the listeners that an account was just set to be disabled/locked out.
     *
     * @param flag The LockOutFlag that was set, which includes the username of the account and start/end times.
     */
    public static void accountLocked(LockOutFlag flag) {
        if (!listeners.isEmpty()) {
            for (LockOutEventListener listener : listeners) {
                try {
                    listener.accountLocked(flag);     
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'accountLocked' event!", e);
                }
            }
        }
    }

    /**
     * Notifies the listeners that an account was just enabled (lockout removed).
     *
     * @param username The username of the account that was enabled.
     */
    public static void accountUnlocked(String username) {
        if (!listeners.isEmpty()) {
            for (LockOutEventListener listener : listeners) {
                try {
                    listener.accountUnlocked(username);
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'accountUnlocked' event!", e);
                }
            }
        }
    }

    /**
     * Notifies the listeners that a locked out account attempted to log in.
     *
     * @param username The username of the account that tried to log in.
     */
    public static void lockedAccountDenied(String username) {<FILL_FUNCTION_BODY>}

}

        if (!listeners.isEmpty()) {
            for (LockOutEventListener listener : listeners) {
                try {
                    listener.lockedAccountDenied(username);
                } catch (Exception e) {
                    Log.warn("An exception occurred while dispatching a 'lockedAccountDenied' event!", e);
                }
            }
        }
    
<no_super_class>