All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.skuzzle.jeve.RegistrationEvent Maven / Gradle / Ivy

The newest version!
package de.skuzzle.jeve;

/**
 * RegistrationEvents are created when adding or removing a {@link Listener}
 * to/from a {@link ListenerStore}.
 *
 * @author Simon Taddiken
 * @since 1.0.0
 */
public final class RegistrationEvent extends Event {

    /** The class for which the listener has been added or removed */
    private final Class cls;

    /**
     * Creates a new RegistrationEvent.
     *
     * @param source The ListenerStore for which a Listener as added or removed.
     * @param cls The class for which the Listener was added ore removed.
     */
    public RegistrationEvent(ListenerStore source, Class cls) {
        super(source, Listener.class);
        this.cls = cls;
    }

    /**
     * Gets the class for which the Listener has been added or removed.
     *
     * @return The event class.
     */
    public Class getEventClass() {
        return this.cls;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy