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

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 type)
	{
		ServiceLocator serviceLocator= ServiceLocator.getInstance();
		Class implementationForInterface= serviceLocator.getMetadataManager().getImplementationForInterface(type);
		return serviceLocator.getReflectionService().createClassInstance((Class) implementationForInterface);
	}

	public  T createFixedSyncService(Class type)
	{
		return (T) ServiceLocator.getInstance().getMetadataManager().getImplementationForInterface(type);
	}

	public  AsyncServiceExecutor createAsyncService(Class type)
	{
		return null;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy