All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mycomm.itool.AuthAPI.base.BaseAuthN Maven / Gradle / Ivy

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycomm.itool.AuthAPI.base;

import com.mycomm.itool.AuthAPI.AuthInitializer;
import com.mycomm.itool.MyPublicTool.logs.TheLogger;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author jw362j
 */
public abstract class BaseAuthN {
    public static final TheLogger logger = new TheLogger() {
        public void info(String msg) {
              System.out.println(msg);
        }

        public void debug(String msg) {
             System.out.println(msg);
        }

        public void error(String msg) {
             System.err.println(msg);
        }
    };
    protected String hostBaseUrl;
    private List initializers;
    public BaseAuthN(String hostBaseUrl) {
        this.hostBaseUrl = hostBaseUrl;
        doInit();
        initAuthN();
    }
    public abstract void initAuthN();
    
    private void doInit(){
        initializers = new ArrayList();
        initializers.add(new AuthInitializer() {
            public void doInit() {
                //nothing...
            }
        });
        for(AuthInitializer initializer :initializers){
            initializer.doInit();
        }
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy