| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jmx4odp.dynamicManagement.PropertyReader
public final class PropertyReader
These are created by the PropertyReaderFactory. They are in memory singletons that are automatically instrumented and mbeans. You can access the values as type specific. You can add a listener to the PropertyReader to monitor when an existing value has been updated.
PropertyReaderFactory| Constructor Summary | |
|---|---|
protected  | 
PropertyReader()
 | 
protected  | 
PropertyReader(PropertyReader pr)
 | 
| Method Summary | |
|---|---|
 void | 
addNotificationListener(javax.management.NotificationListener listener,
                        javax.management.NotificationFilter filter,
                        java.lang.Object handback)
 | 
 boolean | 
contains(java.lang.String key)
 | 
 void | 
destroy()
remove any resources attributed to this object  | 
 boolean | 
getBoolean(java.lang.String key)
Tries to parse the data as a boolean.  | 
 boolean | 
getBoolean(java.lang.String key,
           boolean defaultValue)
Tries to parse the data as a boolean.  | 
 java.util.Date | 
getCreateDate()
 | 
 double | 
getDouble(java.lang.String key)
 | 
 double | 
getDouble(java.lang.String key,
          double defaultValue)
Tries to parse the data as a double.  | 
 float | 
getFloat(java.lang.String key)
 | 
 float | 
getFloat(java.lang.String key,
         float defaultValue)
Tries to parse the data as a float.  | 
 int | 
getInt(java.lang.String key)
Tries to parse the data as a int.  | 
 int | 
getInt(java.lang.String key,
       int defaultValue)
Tries to parse the data as a int.  | 
 java.util.HashMap | 
getKeyValues()
 | 
 long | 
getLong(java.lang.String key)
Tries to parse the data as a long.  | 
 long | 
getLong(java.lang.String key,
        long defaultValue)
Tries to parse the data as a long.  | 
 javax.management.MBeanNotificationInfo[] | 
getNotificationInfo()
 | 
 javax.management.ObjectName | 
getObjectName()
 | 
 java.util.HashMap | 
getPrefixedProperties(java.lang.String prefix)
 | 
 java.util.Properties | 
getProperties()
return the properties set as a Properties object.  | 
 java.util.HashMap | 
getPropertiesByKeyName(java.lang.String keyName)
 | 
 java.util.HashMap | 
getPropertiesByKeyName(java.lang.String keyName,
                       java.lang.String separator)
 | 
 java.util.Iterator | 
getPropertyNames()
 | 
 java.lang.String | 
getPropertyString()
 | 
 java.lang.String | 
getResourceName()
 | 
 short | 
getShort(java.lang.String key)
 | 
 short | 
getShort(java.lang.String key,
         short defaultValue)
Tries to parse the data as a short.  | 
 java.lang.String | 
getString(java.lang.String key)
Tries to parse the data as a String.  | 
 java.lang.String | 
getString(java.lang.String key,
          java.lang.String defaultValue)
Tries to parse the data as a String.  | 
 void | 
init(java.util.HashMap in_keyValues)
initializes the PropertyReader with a HashMap of key/value pairs.  | 
 void | 
init(java.lang.String resource)
same as init(resource, true);  | 
 void | 
init(java.lang.String resource,
     boolean register)
Initializes the PropertyReader with the location of a properties file as a resource  | 
 boolean | 
remove(java.lang.String key)
 | 
 void | 
removeNotificationListener(javax.management.NotificationListener listener)
 | 
 void | 
removeNotificationListener(javax.management.NotificationListener listener,
                           javax.management.NotificationFilter filter,
                           java.lang.Object handback)
 | 
 boolean | 
setBoolean(java.lang.String key,
           boolean val)
Tries to set a boolean value.  | 
 int | 
setInt(java.lang.String key,
       int val)
Tries to set an integer value.  | 
 long | 
setLong(java.lang.String key,
        long val)
Tries to set an long value.  | 
 java.lang.String | 
setString(java.lang.String key,
          java.lang.String val)
Tries to set a String value.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
protected PropertyReader()
protected PropertyReader(PropertyReader pr)
| Method Detail | 
|---|
public java.util.HashMap getKeyValues()
public java.util.Properties getProperties()
public java.util.HashMap getPrefixedProperties(java.lang.String prefix)
prefix, - a string that represents the prefix to a set of property names.
 This will cycle through the full property set and filter out properties with names
 that start with this prefix.
 It will return a HashMap of the properties with the name/key stripped of the
 prefix. This can be used with code uses a set of name=values and uses a prefix
 to seperate out pools or groups.
public java.util.HashMap getPropertiesByKeyName(java.lang.String keyName)
public java.util.HashMap getPropertiesByKeyName(java.lang.String keyName,
                                                java.lang.String separator)
public javax.management.ObjectName getObjectName()
public void init(java.lang.String resource)
          throws java.util.MissingResourceException
java.util.MissingResourceException
public void init(java.lang.String resource,
                 boolean register)
          throws java.util.MissingResourceException
resource - manage - 
java.util.MissingResourceExceptionpublic void init(java.util.HashMap in_keyValues)
in_keyValues - public void destroy()
public java.util.Date getCreateDate()
public java.lang.String getPropertyString()
public boolean contains(java.lang.String key)
public java.util.Iterator getPropertyNames()
public java.lang.String getResourceName()
public int getInt(java.lang.String key)
public int getInt(java.lang.String key,
                  int defaultValue)
public int setInt(java.lang.String key,
                  int val)
public long getLong(java.lang.String key)
public long getLong(java.lang.String key,
                    long defaultValue)
public long setLong(java.lang.String key,
                    long val)
public float getFloat(java.lang.String key)
public float getFloat(java.lang.String key,
                      float defaultValue)
public double getDouble(java.lang.String key)
public double getDouble(java.lang.String key,
                        double defaultValue)
public short getShort(java.lang.String key)
public short getShort(java.lang.String key,
                      short defaultValue)
public boolean getBoolean(java.lang.String key)
public boolean getBoolean(java.lang.String key,
                          boolean defaultValue)
public boolean setBoolean(java.lang.String key,
                          boolean val)
public java.lang.String getString(java.lang.String key)
public java.lang.String getString(java.lang.String key,
                                  java.lang.String defaultValue)
public java.lang.String setString(java.lang.String key,
                                  java.lang.String val)
public boolean remove(java.lang.String key)
name - of the property to remove
public java.lang.String toString()
toString in class java.lang.Object
public void removeNotificationListener(javax.management.NotificationListener listener,
                                       javax.management.NotificationFilter filter,
                                       java.lang.Object handback)
                                throws javax.management.ListenerNotFoundException
removeNotificationListener in interface javax.management.NotificationEmitterjavax.management.ListenerNotFoundException
public void removeNotificationListener(javax.management.NotificationListener listener)
                                throws javax.management.ListenerNotFoundException
removeNotificationListener in interface javax.management.NotificationBroadcasterjavax.management.ListenerNotFoundException
public void addNotificationListener(javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws java.lang.IllegalArgumentException
addNotificationListener in interface javax.management.NotificationBroadcasterjava.lang.IllegalArgumentExceptionpublic javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface javax.management.NotificationBroadcaster
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||