1 8 package org.apache.avalon.phoenix.components.manager; 9 10 import java.util.HashMap ; 11 import java.util.Set ; 12 import javax.management.modelmbean.ModelMBeanInfo ; 13 14 21 public class Target 22 { 23 private final String m_name; 24 private final HashMap m_topics; 25 private final Object m_managedResource; 26 27 33 public Target( final String name, 34 final Object managedResource ) 35 { 36 m_name = name; 37 m_managedResource = managedResource; 38 m_topics = new HashMap (); 39 } 40 41 45 public String getName() 46 { 47 return m_name; 48 } 49 50 55 public Object getManagedResource() 56 { 57 return m_managedResource; 58 } 59 60 67 public void addTopic( final ModelMBeanInfo topic ) 68 { 69 m_topics.put( topic.getDescription(), topic ); 70 } 71 72 76 public void removeTopic( final String name ) 77 { 78 m_topics.remove( name ); 79 } 80 81 87 public ModelMBeanInfo getTopic( final String name ) 88 { 89 return (ModelMBeanInfo )m_topics.get( name ); 90 } 91 92 97 public Set getTopicNames() 98 { 99 return m_topics.keySet(); 100 } 101 } 102 | Popular Tags |