1 17 18 package org.apache.sandesha.server; 19 20 import org.apache.sandesha.util.PropertyLoader; 21 22 35 36 public class InvokerFactory { 37 private static final InvokerFactory INSTANCE = new InvokerFactory(); 39 40 43 public static InvokerFactory getInstance() { 44 return INSTANCE; 45 } 46 47 50 51 public InvokeStrategy createInvokerStrategy() throws Exception { 52 String strategyClassName = PropertyLoader.getInvokeStrategyClassName(); 53 InvokeStrategy strategy = (InvokeStrategy) Class.forName(strategyClassName).newInstance(); 54 strategy.addParams(PropertyLoader.getInvokeStrategyParams()); 55 return strategy; 56 } 57 58 59 public InvokeHandler createInvokeHandler() throws Exception { 60 String handlerClassName = PropertyLoader.getInvokeHandlerClassName(); 61 InvokeHandler handler = (InvokeHandler) Class.forName(handlerClassName).newInstance(); 62 handler.addParams(PropertyLoader.getInvokeHandlerParams()); 63 return handler; 64 } 65 } 66 67 | Popular Tags |