prompto.config.IDebugConfiguration Maven / Gradle / Ivy
The newest version!
package prompto.config;
import java.util.function.Supplier;
public interface IDebugConfiguration {
IDebugEventAdapterConfiguration getEventAdapterConfiguration();
IDebugRequestListenerConfiguration getRequestListenerConfiguration();
T withEventAdapterConfiguration(IDebugEventAdapterConfiguration config);
T withRequestListenerConfiguration(IDebugRequestListenerConfiguration config);
@SuppressWarnings("unchecked")
public static class Inline implements IDebugConfiguration {
Supplier eventAdapterConfiguration = ()->null;
Supplier requestListenerConfiguration = ()->null;
@Override public IDebugEventAdapterConfiguration getEventAdapterConfiguration() { return eventAdapterConfiguration.get(); }
@Override public IDebugRequestListenerConfiguration getRequestListenerConfiguration() { return requestListenerConfiguration.get(); }
@Override
public T withEventAdapterConfiguration(IDebugEventAdapterConfiguration config) {
this.eventAdapterConfiguration = ()->config;
return (T)this;
}
@Override
public T withRequestListenerConfiguration(IDebugRequestListenerConfiguration config) {
this.requestListenerConfiguration = ()->config;
return (T)this;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy