X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Fserver%2FAbsServiceStarter.java;h=23240cf1550e7fb0067ec9657234020d601315fd;hb=a77e3d6e9180c1722a9d18f7717034bb0650a130;hp=fe610e57a9a0c78b503688ddd32f692033ebad60;hpb=39596f5b6d2c67d8c2b357243ecfb2dd6d746796;p=aaf%2Fauthz.git diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java index fe610e57..23240cf1 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsServiceStarter.java @@ -19,7 +19,10 @@ * */ package org.onap.aaf.auth.server; +import java.io.File; import java.io.IOException; +import java.net.Inet4Address; +import java.net.UnknownHostException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -29,6 +32,7 @@ import org.onap.aaf.auth.org.OrganizationFactory; import org.onap.aaf.auth.rserv.RServlet; import org.onap.aaf.cadi.Access; import org.onap.aaf.cadi.Access.Level; +import org.onap.aaf.cadi.config.Config; import org.onap.aaf.cadi.register.Registrant; import org.onap.aaf.cadi.register.Registrar; import org.onap.aaf.misc.env.Trans; @@ -38,6 +42,7 @@ public abstract class AbsServiceStarter registrar; private boolean do_register; protected AbsService service; + protected String hostname; public AbsServiceStarter(final AbsService service) { @@ -51,11 +56,20 @@ public abstract class AbsServiceStarter rserv) throws Exception; - public abstract void _propertyAdjustment(); + + protected abstract void _start(RServlet rserv) throws Exception; + protected abstract void _propertyAdjustment(); public ENV env() { return service.env; @@ -70,6 +84,8 @@ public abstract class AbsServiceStarter app = es.submit(this); final AbsServiceStarter absSS = this; + // Docker/K8 may separately create startup Status in this dir for startup + // sequencing. If so, delete ON EXIT Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { @@ -81,17 +97,15 @@ public abstract class AbsServiceStarter to end:"); + System.out.print(" Hit to end\n:"); try { System.in.read(); System.exit(0); } catch (IOException e) { } } - } - @SafeVarargs public final synchronized void register(final Registrant ... registrants) { if (do_register) { @@ -120,7 +134,28 @@ public abstract class AbsServiceStarter