net.anotheria.anoprise.eventservice.RemoteEventServicePushConsumerProxy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ano-prise Show documentation
Show all versions of ano-prise Show documentation
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.
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