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

org.refcodes.eventbus.impls.EventBusPublisherImpl Maven / Gradle / Ivy

There is a newer version: 3.3.9
Show newest version
package org.refcodes.eventbus.impls;

import org.refcodes.eventbus.EventBusPublisher;
import org.refcodes.observer.Event;

/**
 * This delegate hides any additional functionality away from a caller
 * concerning the the provides implementation.
 *
 * @author steiner
 *
 * @param  The event type.
 */
public class EventBusPublisherImpl> implements EventBusPublisher {

	private EventBusPublisher _publishEventBus;

	/**
	 * Constructs a delegate for a publish event bus.
	 * 
	 * @param aPublishEventBus The publish event bus to hide away.
	 */
	public EventBusPublisherImpl( EventBusPublisher aPublishEventBus ) {
		_publishEventBus = aPublishEventBus;
	}

	@Override
	public void publishEvent( E aEvent ) {
		_publishEventBus.publishEvent( aEvent );
	}

	@Override
	public boolean isMatching( E aEvent ) {
		return _publishEventBus.isMatching( aEvent );
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy