1 23 package com.sun.appserv.management.client.handler; 24 25 import javax.management.ObjectName ; 26 import java.util.Iterator ; 27 28 import com.sun.appserv.management.base.AMX; 29 import com.sun.appserv.management.base.Util; 30 31 36 public final class ProxyCache extends CacheBase<ObjectName , AMX> 37 { 38 public 39 ProxyCache() 40 { 41 } 42 43 46 public void 47 cacheProxy( final AMX proxy ) 48 { 49 final ObjectName objectName = Util.getExtra( proxy ).getObjectName(); 50 51 if ( getCachedProxy( objectName ) != null ) 52 { 53 throw new IllegalArgumentException ( 54 "proxy already cached for: " + objectName ); 55 } 56 57 cacheItem( objectName, proxy ); 58 } 59 60 public AMX 61 getCachedProxy( final ObjectName key ) 62 { 63 return getCachedItem( key ); 64 } 65 66 } 67 68 69 70 71 72 | Popular Tags |