com.dragome.services.LocalServiceFactory Maven / Gradle / Ivy
package com.dragome.services;
import com.dragome.services.interfaces.AsyncServiceExecutor;
import com.dragome.services.interfaces.ServiceFactory;
public class LocalServiceFactory implements ServiceFactory
{
public T createSyncService(Class extends T> type)
{
ServiceLocator serviceLocator= ServiceLocator.getInstance();
Class> implementationForInterface= serviceLocator.getMetadataManager().getImplementationForInterface(type);
return serviceLocator.getReflectionService().createClassInstance((Class extends T>) implementationForInterface);
}
public T createFixedSyncService(Class extends T> type)
{
return (T) ServiceLocator.getInstance().getMetadataManager().getImplementationForInterface(type);
}
public AsyncServiceExecutor createAsyncService(Class extends T> type)
{
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy