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

org.hibernate.event.service.spi.EventListenerRegistry Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.event.service.spi;

import java.io.Serializable;

import org.hibernate.boot.spi.MetadataImplementor;
import org.hibernate.event.spi.EventType;
import org.hibernate.service.Service;

/**
 * Service for accessing each {@link EventListenerGroup} by {@link EventType}, as well as convenience
 * methods for managing the listeners registered in each {@link EventListenerGroup}.
 *
 * @author Steve Ebersole
 */
public interface EventListenerRegistry extends Service, Serializable {
	/**
	 * @deprecated this method was only ever used to initialize the CallbackRegistry
	 * which is now managed as part of the EventEngine
	 */
	@Deprecated
	default void prepare(MetadataImplementor metadata) {
		// by default do nothing now
	}

	 EventListenerGroup getEventListenerGroup(EventType eventType);

	void addDuplicationStrategy(DuplicationStrategy strategy);

	 void setListeners(EventType type, Class... listeners);
	 void setListeners(EventType type, T... listeners);

	 void appendListeners(EventType type, Class... listeners);
	 void appendListeners(EventType type, T... listeners);

	 void prependListeners(EventType type, Class... listeners);
	 void prependListeners(EventType type, T... listeners);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy