com.sun.jimi.util
Class PropertyOwnerBase
java.lang.Object
|
+--com.sun.jimi.util.PropertyOwnerBase
- public class PropertyOwnerBase
- extends java.lang.Object
- implements PropertyOwner
Implementation of the PropertyOwner interface.
This implementation provides sychronised methods for concurrent
access security.
Field Summary |
protected java.util.Hashtable |
props
properties being held |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
props
protected java.util.Hashtable props
- properties being held
PropertyOwnerBase
public PropertyOwnerBase()
setProperty
public void setProperty(java.lang.String key,
java.lang.Object val)
throws InvalidOptionException
- Specified by:
- setProperty in interface PropertyOwner
- Parameters:
key
- the id of the property to set a value forval
- the value to set the property to- Returns:
- the previous value of the property being set
- Throws:
- InvalidOptionException - thrown when an Encoder or Decoder
finds any problems with the key value pair that is set.
getProperty
public java.lang.Object getProperty(java.lang.String key)
- Matching getProperty() method for the setProperty() method.
- Specified by:
- getProperty in interface PropertyOwner
- Parameters:
key
- which property to retrieve the value for- Returns:
- the value in this property list with the specified key value
getPropertyNames
public java.util.Enumeration getPropertyNames()
- Specified by:
- getPropertyNames in interface PropertyOwner
- Returns:
- the names of the properties currently added to this object.
getPossibleValuesForProperty
public java.lang.Object getPossibleValuesForProperty(java.lang.String name)
throws InvalidOptionException
- Returns the
PropertyOwner.ANY_VALUE_STRING
by default.
- Specified by:
- getPossibleValuesForProperty in interface PropertyOwner
- Throws:
- InvalidOptionException - thrown if the param name is not
a valid option for this Property Owner.
getPropertyDescription
public java.lang.String getPropertyDescription(java.lang.String name)
throws InvalidOptionException
- Specified by:
- getPropertyDescription in interface PropertyOwner
clearProperties
public void clearProperties()
- Specified by:
- clearProperties in interface PropertyOwner