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.util.misc.TypeCast; 37 38 import com.sun.appserv.management.ext.logging.LogQueryResult; 39 import com.sun.appserv.management.ext.logging.LogQueryResultImpl; 40 41 42 45 final class LoggingConverterHandler extends ConverterHandler 46 { 47 public 48 LoggingConverterHandler( 49 final ConnectionSource connectionSource, 50 final ObjectName proxiedMBeanObjectName ) 51 throws IOException 52 { 53 super( connectionSource, proxiedMBeanObjectName ); 54 } 55 56 59 protected Object 60 convertResult( 61 final Method method, 62 final Object resultIn ) 63 { 64 Object resultOut = resultIn; 65 66 if ( method.getName().equals( "queryServerLog" ) ) 67 { 68 final List <Serializable []> ls = TypeCast.asList( resultIn ); 69 70 final LogQueryResult converted = new LogQueryResultImpl( ls ); 71 resultOut = converted; 72 } 73 74 return resultOut; 75 } 76 } 77 78 79 80 81 82 | Popular Tags |