1 23 package com.sun.enterprise.management.j2ee; 24 25 import java.util.Map ; 26 import java.io.Serializable ; 27 28 import javax.management.ObjectName ; 29 30 import com.sun.appserv.management.monitor.WebServiceEndpointMonitor; 31 import com.sun.appserv.management.util.misc.ExceptionUtil; 32 import com.sun.appserv.management.util.misc.TypeCast; 33 import com.sun.appserv.management.base.XTypes; 34 import com.sun.appserv.management.monitor.statistics.WebServiceEndpointAggregateStats; 35 36 import com.sun.enterprise.management.support.Delegate; 37 38 40 public final class WebServiceEndpointImpl extends J2EEManagedObjectImplBase 41 { 42 public 43 WebServiceEndpointImpl( final Delegate delegate ) 44 { 45 super( delegate ); 46 } 47 48 public WebServiceEndpointAggregateStats 49 getStats() 50 { 51 return( (WebServiceEndpointAggregateStats)getStatsGeneric() ); 52 } 53 54 public boolean 55 isConfigProvider() 56 { 57 return( false ); 58 } 59 60 public Map <String ,Serializable >[] getMessagesInHistory() { 61 Map <String ,Serializable >[] result = null; 62 try { 63 result= TypeCast.asArray( getDelegate().invoke( 64 "getMessagesInHistory", null, null) ); 65 } catch (Exception e) { 66 final Throwable rootCause = ExceptionUtil.getRootCause( e ); 67 getMBeanLogger().warning( rootCause.toString() + "\n" + 68 ExceptionUtil.getStackTrace( rootCause ) ); 69 } 70 return result; 71 } 72 73 public ObjectName getImplementationPeerObjectName() { 74 unimplementedOperation("getImplementationPeer"); 75 return null; 76 } 77 78 public String getImplementationType() { 79 String result = null; 80 try { 81 if ( getDelegate().supportsOperation( "getImplementationType", null, null ) ) 82 { 83 result= (String )getDelegate().invoke( "getImplementationType", null, null); 84 } 85 } catch (Exception e) { 86 getMBeanLogger().warning( ExceptionUtil.toString( e ) ); 87 } 88 89 return result; 90 } 91 92 protected String getMonitoringPeerJ2EEType() { 93 return( XTypes.WEBSERVICE_ENDPOINT_MONITOR ); 94 } 95 96 } 97 | Popular Tags |