org.eclipse.ecf.discovery
Interface IServiceProperties

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ServiceProperties

public interface IServiceProperties
extends java.io.Serializable


Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getProperty(java.lang.String name)
          Get property as an Object.
 byte[] getPropertyBytes(java.lang.String name)
          Get property name as byte[].
 java.util.Enumeration getPropertyNames()
          Get property names.
 java.lang.String getPropertyString(java.lang.String name)
          Get property name as String.
 int hashCode()
           
 java.lang.Object setProperty(java.lang.String name, java.lang.Object value)
          Set property as Object.
 java.lang.Object setPropertyBytes(java.lang.String name, byte[] value)
          Set property as byte [].
 java.lang.Object setPropertyString(java.lang.String name, java.lang.String value)
          Set property as String.
 int size()
           
 

Method Detail

getPropertyNames

java.util.Enumeration getPropertyNames()
Get property names. This should return an Enumeration of String objects that identify all of the names in this IServiceProperties instance

Returns:
Enumeration of all service property names as Strings. Will not be null.

getPropertyString

java.lang.String getPropertyString(java.lang.String name)
Get 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.

Parameters:
name - the name of the property to return. Must not be null.
Returns:
the property as a String. Will be null if property does not exist.

getPropertyBytes

byte[] getPropertyBytes(java.lang.String name)
Get 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[].

Parameters:
name - the name of the property to return. Must not be null.
Returns:
the property as a byte[]. Will be null if property does not exist.

getProperty

java.lang.Object getProperty(java.lang.String name)
Get property as an Object. Returns a non-null Object if there is a property of the given name. Returns null if there is no property by that name.

Parameters:
name - the name of the property to return. Must not be null.
Returns:
the property as an Object. Returns null if there is no property of given name.

setPropertyString

java.lang.Object setPropertyString(java.lang.String name,
                                   java.lang.String value)
Set property as String.

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 null if not previously in properties.

setPropertyBytes

java.lang.Object setPropertyBytes(java.lang.String name,
                                  byte[] value)
Set property as byte [].

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

setProperty

java.lang.Object setProperty(java.lang.String name,
                             java.lang.Object value)
Set property as Object.

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

equals

boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)

hashCode

int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

size

int size()
Returns:
Answers the number of key/value pairs in this ServiceProperties
See Also:
Dictionary.size()