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

net.anotheria.anoprise.eventservice.RemoteEventServicePushConsumerProxy Maven / Gradle / Ivy

Go to download

Collection of utils for different enterprise class projects. Among other stuff contains Caches, Mocking, DualCrud, MetaFactory and SessionDistributorService. Visit https://opensource.anotheria.net for details.

There is a newer version: 4.0.0
Show newest version
package net.anotheria.anoprise.eventservice;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.rmi.RemoteException;

public class RemoteEventServicePushConsumerProxy implements EventServicePushConsumer {

	private RemoteEventServicePushConsumer consumer;

	private Logger logger = LoggerFactory.getLogger(RemoteEventServicePushConsumerProxy.class.getName());

	public RemoteEventServicePushConsumerProxy(RemoteEventServicePushConsumer aConsumer) {
		this.consumer = aConsumer;
	}

	@Override
	public void push(Event e) {
		if (consumer == null)
			return;

		try {
			consumer.push(e);
		} catch (RemoteException re) {
			logger.warn("Delivering event service event to remote consumer fail.", re);
		}
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy