// Path: qbit/core/src/main/java/io/advantageous/qbit/reactive/Callback.java
// public interface Callback<T> extends io.advantageous.reakt.CallbackHandler<T> {
// 
// 
//     /**
//      * Client View (client of the service)
//      * Called when there is an error
//      *
//      * @param error error
//      */
//     default void onError(final Throwable error) {
// 
//         LoggerFactory.getLogger(Callback.class)
//                 .error(error.getMessage(), error);
// 
//     }
// 
//     /**
//      * Performs this operation on the given argument.
//      *
//      * @param t the input argument
//      */
//     void accept(T t);
// 
// 
//     @Override
//     default void onResult(Result<T> result) {
//         if (result.failure()) {
//             onError(result.cause());
//         } else {
//             accept(result.get());
//         }
//     }
// 
// 
//     /**
//      * Called if there is a timeout.
//      * <p>
//      * This will be taken out in Reakt 3.0 (and QBit 2.0).
//      * Use reject instead.
//      */
//     default void onTimeout() {
//     }
// 
// 
//     /**
//      * Service View (service)
//      * Return an error message
//      * alias for reject.
//      * <p>
//      * This will be taken out in Reakt 3.0 (and QBit 2.0).
//      * Use reject instead.
//      *
//      * @param error error
//      */
//     @Deprecated
//     @SuppressWarnings("deprecated")
//     default void returnError(final String error) {
//         reject(error);
//     }
// 
// 
//     /**
//      * Service View (service)
//      * alias for reply
//      * <p>
//      * This will be taken out in Reakt 3.0 (and QBit 2.0).
//      * Use resolve or reply instead.
//      *
//      * @param thisReturn the value to return.
//      */
//     @Deprecated
//     @SuppressWarnings("deprecated")
//     default void returnThis(T thisReturn) {
//         resolve(thisReturn);
//     }
// 
// 
// }


import io.advantageous.qbit.client.ClientProxy;
import io.advantageous.qbit.reactive.Callback;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
package io.advantageous.qbit.service.health;




/**
 * Async interface to QBit health system.
 */
public interface HealthServiceAsync extends ClientProxy {


    /**
     * Register a service with the health system
     *
     * @param name     name of the service
     * @param ttl      ttl on how long before the service timeout.
     * @param timeUnit time unit for the ttl.
     */
    default void register(String name, long ttl, TimeUnit timeUnit) {
    }


    /**
     * Check in the service so it passes it TTL
     *
     * @param name name of service.
     */
    default void checkInOk(String name) {
    }

    /**
     * Check in with a certain TTL.
     *
     * @param name   name of service (PASS, WARN, FAIL, UNKNOWN)
     * @param status status
     */
    default void checkIn(String name, HealthStatus status) {
    }


    /**
     * Checks to see if all services registered with the health system are ok.
     *
     * @param ok callback
     */
// Path: qbit/core/src/main/java/io/advantageous/qbit/reactive/Callback.java
// public interface Callback<T> extends io.advantageous.reakt.CallbackHandler<T> {
// 
// 
//     /**
//      * Client View (client of the service)
//      * Called when there is an error
//      *
//      * @param error error
//      */
//     default void onError(final Throwable error) {
// 
//         LoggerFactory.getLogger(Callback.class)
//                 .error(error.getMessage(), error);
// 
//     }
// 
//     /**
//      * Performs this operation on the given argument.
//      *
//      * @param t the input argument
//      */
//     void accept(T t);
// 
// 
//     @Override
//     default void onResult(Result<T> result) {
//         if (result.failure()) {
//             onError(result.cause());
//         } else {
//             accept(result.get());
//         }
//     }
// 
// 
//     /**
//      * Called if there is a timeout.
//      * <p>
//      * This will be taken out in Reakt 3.0 (and QBit 2.0).
//      * Use reject instead.
//      */
//     default void onTimeout() {
//     }
// 
// 
//     /**
//      * Service View (service)
//      * Return an error message
//      * alias for reject.
//      * <p>
//      * This will be taken out in Reakt 3.0 (and QBit 2.0).
//      * Use reject instead.
//      *
//      * @param error error
//      */
//     @Deprecated
//     @SuppressWarnings("deprecated")
//     default void returnError(final String error) {
//         reject(error);
//     }
// 
// 
//     /**
//      * Service View (service)
//      * alias for reply
//      * <p>
//      * This will be taken out in Reakt 3.0 (and QBit 2.0).
//      * Use resolve or reply instead.
//      *
//      * @param thisReturn the value to return.
//      */
//     @Deprecated
//     @SuppressWarnings("deprecated")
//     default void returnThis(T thisReturn) {
//         resolve(thisReturn);
//     }
// 
// 
// }


// Path: qbit/core/src/main/java/io/advantageous/qbit/service/health/HealthServiceAsync.java
import io.advantageous.qbit.client.ClientProxy;
import io.advantageous.qbit.reactive.Callback;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;

package io.advantageous.qbit.service.health;




/**
 * Async interface to QBit health system.
 */
public interface HealthServiceAsync extends ClientProxy {


    /**
     * Register a service with the health system
     *
     * @param name     name of the service
     * @param ttl      ttl on how long before the service timeout.
     * @param timeUnit time unit for the ttl.
     */
    default void register(String name, long ttl, TimeUnit timeUnit) {
    }


    /**
     * Check in the service so it passes it TTL
     *
     * @param name name of service.
     */
    default void checkInOk(String name) {
    }

    /**
     * Check in with a certain TTL.
     *
     * @param name   name of service (PASS, WARN, FAIL, UNKNOWN)
     * @param status status
     */
    default void checkIn(String name, HealthStatus status) {
    }


    /**
     * Checks to see if all services registered with the health system are ok.
     *
     * @param ok callback
     */
    default void ok(Callback<Boolean> ok) {