Class ServiceID
java.lang.Object
org.eclipse.ecf.core.identity.BaseID
org.eclipse.ecf.discovery.identity.ServiceID
- All Implemented Interfaces:
Serializable
,Comparable
,Principal
,org.eclipse.core.runtime.IAdaptable
,ID
,IServiceID
- Direct Known Subclasses:
DnsSdServiceID
,JSLPServiceID
Service identity type. ServiceIDs are IDs that uniquely identify a remote
service. Subclasses may be created as appropriate.
- See Also:
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ServiceID
(Namespace namespace, IServiceTypeID type, URI anURI) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected String
(non-Javadoc)Get service name for this ID.Get service type for this ID.Get service type ID for this ID.int
hashCode()
protected int
protected boolean
Called byNamespace.testIDEquals(BaseID, BaseID)
.protected String
Called byNamespace.getNameForID(BaseID)
.protected int
Called byNamespace.getHashCodeForID(BaseID)
.void
setServiceInfo
(IServiceInfo serviceInfo) toString()
Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, getAdapter, getName, getNamespace, namespaceToExternalForm, toExternalForm
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
Methods inherited from interface org.eclipse.ecf.core.identity.ID
getName, getNamespace, toExternalForm
-
Field Details
-
serviceInfo
- Since:
- 3.0
-
type
-
location
- Since:
- 3.0
-
-
Constructor Details
-
ServiceID
- Parameters:
namespace
- namespace should not benull
type
- service type ID should not benull
anURI
- uri for service location should not benull
- Since:
- 3.0
-
-
Method Details
-
getFullyQualifiedName
-
namespaceCompareTo
Description copied from class:BaseID
- Specified by:
namespaceCompareTo
in classBaseID
- Parameters:
o
- the other ID to compare to. Will not benull
.- Returns:
- the appropriate value as per
Comparable
contract.
-
namespaceEquals
Description copied from class:BaseID
Called byNamespace.testIDEquals(BaseID, BaseID)
.- Specified by:
namespaceEquals
in classBaseID
- Parameters:
o
- the other ID to test against. May benull
.- Returns:
true
if this ID is equal to the given ID.false
otherwise.
-
namespaceGetName
Description copied from class:BaseID
Called byNamespace.getNameForID(BaseID)
.- Specified by:
namespaceGetName
in classBaseID
- Returns:
- String name for this ID. Must not be
null
. Value returned should be unique within this Namespace.
-
namespaceHashCode
protected int namespaceHashCode()Description copied from class:BaseID
Called byNamespace.getHashCodeForID(BaseID)
.- Specified by:
namespaceHashCode
in classBaseID
- Returns:
- int hashCode for this ID. Returned value must be unique within this process.
-
getServiceType
Get service type for this ID.- Returns:
- String service type. Will not be
null
.
-
getServiceTypeID
Description copied from interface:IServiceID
Get service type ID for this ID.- Specified by:
getServiceTypeID
in interfaceIServiceID
- Returns:
- IServiceTypeID. Will not be
null
.
-
getServiceName
Get service name for this ID.- Specified by:
getServiceName
in interfaceIServiceID
- Returns:
- String service name. May be
null
.
-
toString
-
getLocation
(non-Javadoc)- Specified by:
getLocation
in interfaceIServiceID
- Returns:
- URI the location for this serviceID
- Since:
- 3.0
- See Also:
-
getServiceInfo
- Returns:
- the serviceInfo
- Since:
- 3.0
-
setServiceInfo
- Parameters:
serviceInfo
- the serviceInfo to set- Since:
- 3.0
-
hashCode
public int hashCode() -
equals
-