1 46 package org.mr.kernel.services; 47 48 import org.mr.MantaAgent; 49 import org.mr.kernel.services.topics.TopicServiceFactory; 50 51 55 public class ServiceFactory { 56 57 public static MantaService createService(String service, byte serviceType){ 58 boolean motiFactory = false; 59 MantaService result = null; 60 61 if(serviceType ==MantaService.SERVICE_TYPE_QUEUE){ 62 result = MantaAgent.getInstance().getSingletonRepository() 63 .getQueueServiceFactory().generateQueueService(service); 64 }else{ 65 result = TopicServiceFactory.generateTopicService(service); 66 } 67 68 return result; 69 } 70 71 } 72 | Popular Tags |