1 23 package com.sun.enterprise.admin.wsmgmt.stats.spi; 24 25 import java.util.HashMap ; 26 27 30 public class StatsProviderManager { 31 32 35 public void registerEndpointStatsProvider(String endpoint, 36 WebServiceEndpointStatsProvider prov) { 37 38 wsEpStatMap.put(endpoint, prov); 39 } 40 41 public void unregisterEndpointStatsProvider(String endpoint) { 42 43 wsEpStatMap.remove(endpoint); 44 } 45 46 public WebServiceEndpointStatsProvider getEndpointStatsProvider(String 47 endpoint) { 48 Object obj = wsEpStatMap.get(endpoint); 49 if ( obj != null ) { 50 return (WebServiceEndpointStatsProvider) obj; 51 } 52 else { 53 return null; 54 } 55 } 56 57 62 63 public static synchronized StatsProviderManager getInstance() { 64 if ( sm == null) { 65 sm = new StatsProviderManager(); 66 } 67 return sm; 68 } 69 70 private static StatsProviderManager sm = null; 71 72 private StatsProviderManager() { wsEpStatMap = new HashMap (); } 73 74 76 private HashMap wsEpStatMap; 77 } 78 | Popular Tags |