Package org.eclipse.ecf.discovery
Class ServiceProperties
- java.lang.Object
- 
- org.eclipse.ecf.discovery.ServiceProperties
 
- 
- All Implemented Interfaces:
- Serializable,- IServiceProperties
 
 public class ServiceProperties extends Object implements IServiceProperties Service properties implementation class forIServiceProperties. Subclasses may be created as appropriate.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description ServiceProperties()ServiceProperties(Properties props)ServiceProperties(IServiceProperties sp)Creates a copy of the givenIServiceProperties
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertiesasProperties()booleanequals(Object obj)ObjectgetProperty(String name)Get property as an Object.byte[]getPropertyBytes(String name)Get property name as byte[].EnumerationgetPropertyNames()Get property names.StringgetPropertyString(String name)Get property name as String.inthashCode()ObjectsetProperty(String name, Object value)Set property as Object.ObjectsetPropertyBytes(String name, byte[] value)Set property as byte [].ObjectsetPropertyString(String name, String value)Set property as String.intsize()StringtoString()
 
- 
- 
- 
Constructor Detail- 
ServicePropertiespublic ServiceProperties() 
 - 
ServicePropertiespublic ServiceProperties(Properties props) 
 - 
ServicePropertiespublic ServiceProperties(IServiceProperties sp) Creates a copy of the givenIServiceProperties- Parameters:
- sp- service properties
- Since:
- 2.1
 
 
- 
 - 
Method Detail- 
getPropertyNamespublic Enumeration getPropertyNames() Description copied from interface:IServicePropertiesGet property names. This should return an Enumeration of String objects that identify all of the names in this IServiceProperties instance- Specified by:
- getPropertyNamesin interface- IServiceProperties
- Returns:
- Enumeration of all service property names as Strings.  Will not be null.
 
 - 
getPropertyStringpublic String getPropertyString(String name) Description copied from interface:IServicePropertiesGet property name as String. Returns a valid String if there is a property of the given name. Returns null if there is no property by that name, or if the property has some other type than String.- Specified by:
- getPropertyStringin interface- IServiceProperties
- Parameters:
- name- the name of the property to return. Must not be- null.
- Returns:
- the property as a String.  Will be nullif property does not exist.
 
 - 
getPropertyBytespublic byte[] getPropertyBytes(String name) Description copied from interface:IServicePropertiesGet property name as byte[]. Returns a non-null byte[] if there is a property of the given name. Returns null if there is no property by that name, or if the property has some other type than byte[].- Specified by:
- getPropertyBytesin interface- IServiceProperties
- Parameters:
- name- the name of the property to return. Must not be- null.
- Returns:
- the property as a byte[].  Will be nullif property does not exist.
 
 - 
getPropertypublic Object getProperty(String name) Description copied from interface:IServicePropertiesGet property as an Object. Returns a non-null Object if there is a property of the given name. Returnsnullif there is no property by that name.- Specified by:
- getPropertyin interface- IServiceProperties
- Parameters:
- name- the name of the property to return. Must not be- null.
- Returns:
- the property as an Object.  Returns nullif there is no property of given name.
 
 - 
setPropertypublic Object setProperty(String name, Object value) Description copied from interface:IServicePropertiesSet property as Object.- Specified by:
- setPropertyin interface- IServiceProperties
- Parameters:
- name- the property name of the property. Must not be null.
- value- the property value to associated with the name. Must not be null.
- Returns:
- Object that was previous value associated with given name. Null if not previously in properties
 
 - 
setPropertyBytespublic Object setPropertyBytes(String name, byte[] value) Description copied from interface:IServicePropertiesSet property as byte [].- Specified by:
- setPropertyBytesin interface- IServiceProperties
- Parameters:
- name- the property name of the property. Must not be null.
- value- the property value to associated with the name. Must not be null.
- Returns:
- Object that was previous value associated with given name. Null if not previously in properties
 
 - 
setPropertyStringpublic Object setPropertyString(String name, String value) Description copied from interface:IServicePropertiesSet property as String.- Specified by:
- setPropertyStringin interface- IServiceProperties
- Parameters:
- name- the property name of the property. Must not be- null.
- value- the property value to associated with the name. Must not be- null.
- Returns:
- Object that was previous value associated with given name. May be nullif not previously in properties.
 
 - 
equalspublic boolean equals(Object obj) - Specified by:
- equalsin interface- IServiceProperties
- Overrides:
- equalsin class- Object
- See Also:
- Object.equals(Object)
 
 - 
hashCodepublic int hashCode() - Specified by:
- hashCodein interface- IServiceProperties
- Overrides:
- hashCodein class- Object
- See Also:
- Object.hashCode()
 
 - 
sizepublic int size() - Specified by:
- sizein interface- IServiceProperties
- Returns:
- Answers the number of key/value pairs in this ServiceProperties
- See Also:
- Dictionary.size()
 
 - 
asPropertiespublic Properties asProperties() - Returns:
- Properties
- Since:
- 3.0
 
 
- 
 
-