1 23 24 29 package com.sun.enterprise.admin.mbeans; 30 31 32 import java.util.Set ; 33 import javax.management.ObjectName ; 34 import javax.management.StandardMBean ; 35 import javax.management.NotCompliantMBeanException ; 36 37 38 import com.sun.enterprise.admin.dottedname.*; 39 40 43 public class DottedNameRegistryMBeanImpl extends StandardMBean implements DottedNameRegistryMBean 44 { 45 final DottedNameRegistry1To1Impl mRegistry; 46 47 public 48 DottedNameRegistryMBeanImpl( ) 49 throws NotCompliantMBeanException 50 { 51 super( DottedNameRegistry.class ); 52 53 mRegistry = new DottedNameRegistry1To1Impl(); 54 } 55 56 public ObjectName 57 dottedNameToObjectName( String dottedName ) 58 { 59 return( mRegistry.dottedNameToObjectName( dottedName ) ); 60 } 61 62 public String 63 objectNameToDottedName( ObjectName objectName ) 64 { 65 return( mRegistry.objectNameToDottedName( objectName ) ); 66 } 67 68 public Set 69 allDottedNameStrings( ) 70 { 71 final Set tempNames = mRegistry.allDottedNameStrings(); 72 Set names = null; 73 74 if ( tempNames instanceof java.io.Serializable ) 75 { 76 names = tempNames; 77 } 78 else 79 { 80 names = new java.util.HashSet (); 81 names.addAll( tempNames ); 82 } 83 84 return( names ); 85 } 86 87 public Set 88 allObjectNames( ) 89 { 90 return( mRegistry.allObjectNames() ); 91 } 92 93 public void 94 add( String dottedName, ObjectName objectName ) 95 { 96 mRegistry.add( dottedName, objectName ); 97 } 98 99 public void 100 remove( String dottedName ) 101 { 102 mRegistry.remove( dottedName ); 103 } 104 105 public void 106 remove( ObjectName objectName ) 107 { 108 mRegistry.remove( objectName ); 109 } 110 } 111 112 | Popular Tags |