1 23 package com.sun.appserv.management.client.handler; 24 25 import java.lang.reflect.Method ; 26 27 import java.util.List ; 28 29 import java.io.Serializable ; 30 import java.io.IOException ; 31 32 import javax.management.ObjectName ; 33 34 import com.sun.appserv.management.client.ConnectionSource; 35 36 import com.sun.appserv.management.base.XTypes; 37 import com.sun.appserv.management.base.Util; 38 39 import static com.sun.appserv.management.j2ee.J2EETypes.WEB_SERVICE_ENDPOINT; 40 import static com.sun.appserv.management.base.XTypes.LOGGING; 41 import static com.sun.appserv.management.base.XTypes.WEB_SERVICE_MGR; 42 43 import com.sun.appserv.management.util.misc.TypeCast; 44 import com.sun.appserv.management.util.jmx.MBeanProxyHandler; 45 46 import com.sun.appserv.management.ext.logging.LogQueryResult; 47 import com.sun.appserv.management.ext.logging.LogQueryResultImpl; 48 49 50 53 public final class ConverterHandlerFactory 54 { 55 private ConverterHandlerFactory() {} 56 57 public static MBeanProxyHandler 58 createHandler( 59 final ConnectionSource connSource, 60 final ObjectName objectName ) 61 throws IOException 62 { 63 final String j2eeType = Util.getJ2EEType( objectName ); 64 65 AMXProxyHandler handler = null; 66 67 if ( LOGGING.equals( j2eeType ) ) 68 { 69 handler = new LoggingConverterHandler( connSource, objectName ); 70 } 71 else if ( WEB_SERVICE_ENDPOINT.equals( j2eeType ) ) 72 { 73 handler = new WebServiceEndpointConverterHandler( connSource, objectName ); 74 } 76 else if ( WEB_SERVICE_MGR.equals( j2eeType ) ) 77 { 78 handler = new WebServiceMgrConverterHandler( connSource, objectName ); 79 } 81 else 82 { 83 handler = new AMXProxyHandler( connSource, objectName ); 84 } 85 86 return handler; 87 } 88 89 } 90 91 92 93 94 95 | Popular Tags |