1 23 package com.sun.appserv.management.client.handler; 24 25 import java.lang.reflect.Method ; 26 27 import java.util.Map ; 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.wsmgmt.WebServiceSupport; 39 import com.sun.appserv.management.ext.wsmgmt.MessageTrace; 40 41 import com.sun.appserv.management.ext.wsmgmt.MessageTrace; 42 43 44 47 final class WebServiceEndpointConverterHandler extends ConverterHandler 48 { 49 public 50 WebServiceEndpointConverterHandler( 51 final ConnectionSource connectionSource, 52 final ObjectName proxiedMBeanObjectName ) 53 throws IOException 54 { 55 super( connectionSource, proxiedMBeanObjectName ); 56 } 57 58 61 protected Object 62 convertResult( 63 final Method method, 64 final Object resultIn ) 65 { 66 Object resultOut = resultIn; 67 68 if ( method.getName().equals( "getMessagesInHistory" ) ) 69 { 70 final Map <String ,Serializable >[] maps = TypeCast.asArray( resultIn ); 71 72 final MessageTrace[] traces = new MessageTrace[ maps.length ]; 73 for( int i = 0; i < traces.length; ++i ) 74 { 75 traces[ i ] = WebServiceSupport.mapToMessageTrace( maps[i] ); 76 } 77 78 resultOut = traces; 79 } 80 81 return resultOut; 82 } 83 } 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | Popular Tags |