net.anotheria.anosite.gen.assiteconfig.service.ASSiteConfigServiceFactory Maven / Gradle / Ivy
/**
********************************************************************************
*** ASSiteConfigServiceFactory.java ***
*** The factory for the IASSiteConfigService implementation. ***
*** generated by AnoSiteGenerator (ASG), Version: 2.6.3 ***
*** Copyright (C) 2005 - 2010 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.assiteconfig.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 ASSiteConfigServiceFactory implements ServiceFactory{
private static AtomicInteger instanceCounter = new AtomicInteger(0);
private static IASSiteConfigService defaultInstance = createASSiteConfigService();
public IASSiteConfigService create(){
return createASSiteConfigService();
}
public static IASSiteConfigService createASSiteConfigService(){
MoskitoInvokationProxy proxy = new MoskitoInvokationProxy(
createInstance(),
new ServiceStatsCallHandler(),
new ServiceStatsFactory(),
"IASSiteConfigService-"+instanceCounter.incrementAndGet(),
"service",
"asg-cms",
IASSiteConfigService.class, ASGService.class
);
return (IASSiteConfigService) proxy.createProxy();
}
private static IASSiteConfigService createInstance(){
return ASSiteConfigServiceImpl.getInstance();
}
static IASSiteConfigService getDefaultInstance(){
return defaultInstance;
}
}