1 55 package org.jboss.axis.deployment.wsdd.providers; 56 57 import org.jboss.axis.ConfigurationException; 58 import org.jboss.axis.EngineConfiguration; 59 import org.jboss.axis.Handler; 60 import org.jboss.axis.deployment.wsdd.WSDDConstants; 61 import org.jboss.axis.deployment.wsdd.WSDDProvider; 62 import org.jboss.axis.deployment.wsdd.WSDDService; 63 import org.jboss.axis.utils.ClassUtils; 64 import org.jboss.axis.utils.Messages; 65 66 72 public class WSDDHandlerProvider 73 extends WSDDProvider 74 { 75 public String getName() 76 { 77 return WSDDConstants.PROVIDER_HANDLER; 78 } 79 80 public Handler newProviderInstance(WSDDService service, 81 EngineConfiguration registry) 82 throws Exception 83 { 84 String providerClass = service.getParameter("handlerClass"); 85 if (providerClass == null) 86 { 87 throw new ConfigurationException(Messages.getMessage("noHandlerClass00")); 88 } 89 90 Class _class = ClassUtils.forName(providerClass); 91 92 if (!(Handler.class.isAssignableFrom(_class))) 93 { 94 throw new ConfigurationException(Messages.getMessage("badHandlerClass00", 95 _class.getName())); 96 } 97 98 return (Handler)_class.newInstance(); 99 } 100 } 101 | Popular Tags |