@@ -0,0 +1,1859 @@
+/*%0A * Copyright 2014-2018 Groupon, Inc%0A * Copyright 2014-2018 The Billing Project, LLC%0A *%0A * The Billing Project licenses this file to you under the Apache License, version 2.0%0A * (the %22License%22); you may not use this file except in compliance with the%0A * License.  You may obtain a copy of the License at:%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the%0A * License for the specific language governing permissions and limitations%0A * under the License.%0A */%0A%0Apackage org.killbill.billing.osgi.api;%0A%0Aimport java.util.Collections;%0Aimport java.util.Map;%0A%0Aimport org.killbill.billing.tenant.api.Tenant;%0A%0Apublic interface Healthcheck %7B%0A%0A    public HealthStatus getHealthStatus(/* @Nullable */ final Tenant tenant, /* @Nullable */ final Map properties);%0A%0A    public class HealthStatus %7B%0A%0A        private final boolean healthy;%0A        private final Map details;%0A%0A        public HealthStatus(final boolean healthy, final Map details) %7B%0A            this.details = details;%0A            this.healthy = healthy;%0A        %7D%0A%0A        public static HealthStatus healthy() %7B%0A            return new HealthStatus(true, Collections.EMPTY_MAP);%0A        %7D%0A%0A        public static HealthStatus healthy(final String message) %7B%0A            return new HealthStatus(true, Collections.singletonMap(%22message%22, message));%0A        %7D%0A%0A        public static HealthStatus unHealthy(final String message) %7B%0A            return new HealthStatus(false, Collections.singletonMap(%22message%22, message));%0A        %7D%0A%0A        public boolean isHealthy() %7B%0A            return healthy;%0A        %7D%0A%0A        public Map getDetails() %7B%0A            return details;%0A        %7D%0A    %7D%0A%7D%0A

add Healthcheck service