net.anotheria.anosite.gen.asresourcedata.service.fixture.ASResourceDataServiceFixtureFactory Maven / Gradle / Ivy
/**
********************************************************************************
*** ASResourceDataServiceFixtureFactory.java ***
*** The factory for the IASResourceDataService 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.asresourcedata.service.fixture;
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.anosite.gen.asresourcedata.service.IASResourceDataService;
import net.anotheria.asg.service.IFixtureService;
import net.anotheria.anoprise.metafactory.ServiceFactory;
public class ASResourceDataServiceFixtureFactory implements ServiceFactory{
private static AtomicInteger instanceCounter = new AtomicInteger(0);
private static IASResourceDataService defaultInstance = createASResourceDataService();
public IASResourceDataService create(){
return createASResourceDataService();
}
public static IASResourceDataService createASResourceDataService(){
MoskitoInvokationProxy proxy = new MoskitoInvokationProxy(
createInstance(),
new ServiceStatsCallHandler(),
new ServiceStatsFactory(),
"IASResourceDataService-"+instanceCounter.incrementAndGet(),
"service",
"asg-fixture",
IASResourceDataService.class, ASGService.class, IFixtureService.class
);
return (IASResourceDataService) proxy.createProxy();
}
private static IASResourceDataService createInstance(){
return ASResourceDataServiceFixtureImpl.getInstance();
}
static IASResourceDataService getDefaultInstance(){
return defaultInstance;
}
}