Fixes/Refinements from Testing
[aaf/authz.git] / auth / auth-core / src / main / java / org / onap / aaf / auth / server / AbsServiceStarter.java
index b3e2883..f583113 100644 (file)
@@ -43,9 +43,11 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
     private boolean do_register;
     protected AbsService<ENV,TRANS> service;
        protected String hostname;
+       protected final boolean secure;
 
 
-    public AbsServiceStarter(final AbsService<ENV,TRANS> service) {
+    public AbsServiceStarter(final AbsService<ENV,TRANS> service, boolean secure) {
+       this.secure = secure;
         this.service = service;
         try {
             OrganizationFactory.init(service.env);
@@ -56,7 +58,6 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
         // do_register - this is used for specialty Debug Situations.  Developer can create an Instance for a remote system
         // for Debugging purposes without fear that real clients will start to call your debug instance
         do_register = !"TRUE".equalsIgnoreCase(access().getProperty("aaf_locate_no_register",null));
-        _propertyAdjustment();
         hostname = access().getProperty(Config.HOSTNAME, null);
         if (hostname==null) {
             try {
@@ -65,10 +66,12 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
                                hostname= "cannotBeDetermined";
                        }
         }
+        _propertyAdjustment();
     }
     
-    public abstract void _start(RServlet<TRANS> rserv) throws Exception;
-    public abstract void _propertyAdjustment();
+    
+    protected abstract void _start(RServlet<TRANS> rserv) throws Exception;
+    protected abstract void _propertyAdjustment();
     
     public ENV env() {
         return service.env;
@@ -95,18 +98,18 @@ public abstract class AbsServiceStarter<ENV extends RosettaEnv, TRANS extends Tr
        });
                if(System.getProperty("ECLIPSE", null)!=null) {
                        Thread.sleep(2000);
-               System.out.println("Service Started in Eclipse: ");
-               System.out.print("  Hit <enter> to end:");
-               try {
-                               System.in.read();
-                               System.exit(0);
-                       } catch (IOException e) {
+                       if(!app.isCancelled()) {
+                       System.out.println("Service Started in Eclipse: ");
+                       System.out.print("  Hit <enter> to end:\n");
+                       try {
+                                       System.in.read();
+                                       System.exit(0);
+                               } catch (IOException e) {
+                               }
                        }
                }
-
     }
     
-
     @SafeVarargs
     public final synchronized void register(final Registrant<ENV> ... registrants) {
         if (do_register) {