net.anotheria.anosite.gen.asfeature.service.ASFeatureServiceFactory Maven / Gradle / Ivy
/**
********************************************************************************
*** ASFeatureServiceFactory.java ***
*** The factory for the IASFeatureService implementation. ***
*** generated by AnoSiteGenerator (ASG), Version: 3.2.2 ***
*** Copyright (C) 2005 - 2023 Anotheria.net, www.anotheria.net ***
*** All Rights Reserved. ***
********************************************************************************
*** Don't edit this code, if you aren't sure ***
*** that you do exactly know what you are doing! ***
*** It's better to invest time in the generator, as into the generated code. ***
********************************************************************************
*/
package net.anotheria.anosite.gen.asfeature.service;
import java.util.concurrent.atomic.AtomicInteger;
import net.anotheria.moskito.core.dynamic.MoskitoInvokationProxy;
import net.anotheria.moskito.core.predefined.ServiceStatsCallHandler;
import net.anotheria.moskito.core.predefined.ServiceStatsFactory;
import net.anotheria.asg.service.ASGService;
import net.anotheria.anoprise.metafactory.ServiceFactory;
public class ASFeatureServiceFactory implements ServiceFactory{
private static AtomicInteger instanceCounter = new AtomicInteger(0);
private static IASFeatureService defaultInstance = createASFeatureService();
public IASFeatureService create(){
return createASFeatureService();
}
public static IASFeatureService createASFeatureService(){
MoskitoInvokationProxy proxy = new MoskitoInvokationProxy(
createInstance(),
new ServiceStatsCallHandler(),
new ServiceStatsFactory(),
"IASFeatureService-"+instanceCounter.incrementAndGet(),
"service",
"asg-cms",
IASFeatureService.class, ASGService.class
);
return (IASFeatureService) proxy.createProxy();
}
private static IASFeatureService createInstance(){
return ASFeatureServiceImpl.getInstance();
}
static IASFeatureService getDefaultInstance(){
return defaultInstance;
}
}