
com.indeed.status.core.CallablePingMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of status-core Show documentation
Show all versions of status-core Show documentation
Basic core functionality for status checking of app dependencies
package com.indeed.status.core;
import javax.annotation.Nonnull;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
/**
* @author matts
*/
public class CallablePingMethod implements PingMethod {
@Nonnull private final Callable delegate;
public CallablePingMethod(@Nonnull final Callable delegate) {
this.delegate = delegate;
}
public CallablePingMethod(@Nonnull final Runnable delegate) {
this.delegate = Executors.callable(delegate, null);
}
@Override
public void ping() throws Exception {
delegate.call();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy