1 22 package org.jboss.mq.server.jmx; 23 24 import javax.jms.IllegalStateException ; 25 import org.jboss.mq.server.JMSServerInterceptor; 26 27 36 public class InterceptorLoader extends InterceptorMBeanSupport implements InterceptorLoaderMBean 37 { 38 41 private JMSServerInterceptor interceptor; 42 48 public JMSServerInterceptor getInterceptor() 49 { 50 return interceptor; 51 } 52 55 public void setInterceptorClass(String c) throws Exception 56 { 57 interceptor = (JMSServerInterceptor) Thread.currentThread().getContextClassLoader().loadClass(c).newInstance(); 58 } 59 62 public String getInterceptorClass() throws Exception 63 { 64 return interceptor.getClass().getName(); 65 } 66 67 protected void startService() throws Exception 68 { 69 if (interceptor == null) 70 throw new IllegalStateException ("The interceptor class was not set (null)"); 71 super.startService(); 72 } 73 } 74 | Popular Tags |