com.oath.micro.server.errors.ErrorBus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of micro-error-codes Show documentation
Show all versions of micro-error-codes Show documentation
Plugin for handling errors in a standardized way
package com.oath.micro.server.errors;
import com.google.common.eventbus.EventBus;
public class ErrorBus {
private static EventBus errorBus;
public static synchronized void setErrorBus(final EventBus bus){
errorBus = bus;
}
public void post(final Object o){
if(errorBus!=null) {
errorBus.post(o);
}
}
}