Class ServiceTypeID
- java.lang.Object
- 
- org.eclipse.ecf.core.identity.BaseID
- 
- org.eclipse.ecf.discovery.identity.ServiceTypeID
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable,- Principal,- org.eclipse.core.runtime.IAdaptable,- ID,- IServiceTypeID
 - Direct Known Subclasses:
- DnsSdServiceTypeID,- JSLPServiceTypeID,- ZooDiscoveryServiceTypeID
 
 public class ServiceTypeID extends BaseID implements IServiceTypeID ServiceTypeID base class.- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringDELIMprotected StringnamingAuthorityprotected String[]protocolsprotected String[]scopesprotected String[]servicesprotected StringtypeName- 
Fields inherited from interface org.eclipse.ecf.discovery.identity.IServiceTypeIDDEFAULT_NA, DEFAULT_PROTO, DEFAULT_SCOPE
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedServiceTypeID(Namespace namespace)ServiceTypeID(Namespace namespace, String aType)Clients should not call this method directly.protectedServiceTypeID(Namespace namespace, String[] services, String[] scopes, String[] protocols, String namingAuthority)protectedServiceTypeID(Namespace ns, IServiceTypeID id)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateType()booleanequals(Object o)StringgetInternal()Get the internal name of the service type.StringgetName()Get the unique name of this identity.StringgetNamingAuthority()String[]getProtocols()String[]getScopes()String[]getServices()inthashCode()protected intnamespaceCompareTo(BaseID o)protected booleannamespaceEquals(BaseID o)Called byNamespace.testIDEquals(BaseID, BaseID).protected StringnamespaceGetName()Called byNamespace.getNameForID(BaseID).protected intnamespaceHashCode()Called byNamespace.getHashCodeForID(BaseID).StringtoString()- 
Methods inherited from class org.eclipse.ecf.core.identity.BaseIDcompareTo, getAdapter, getNamespace, namespaceToExternalForm, toExternalForm
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface java.lang.ComparablecompareTo
 - 
Methods inherited from interface org.eclipse.ecf.core.identity.IDgetNamespace, toExternalForm
 
- 
 
- 
- 
- 
Constructor Detail- 
ServiceTypeIDprotected ServiceTypeID(Namespace namespace) 
 - 
ServiceTypeIDprotected ServiceTypeID(Namespace namespace, String[] services, String[] scopes, String[] protocols, String namingAuthority) 
 - 
ServiceTypeIDprotected ServiceTypeID(Namespace ns, IServiceTypeID id) 
 - 
ServiceTypeIDpublic ServiceTypeID(Namespace namespace, String aType) Clients should not call this method directly. Use theNamespaceand/orServiceIDFactoryinstead.- Parameters:
- namespace- namespace should not be- null
- aType- type should not be- null
 
 
- 
 - 
Method Detail- 
createTypeprotected void createType() 
 - 
getNamepublic String getName() Description copied from interface:IDGet the unique name of this identity.
 - 
namespaceCompareToprotected int namespaceCompareTo(BaseID o) Description copied from class:BaseID- Specified by:
- namespaceCompareToin class- BaseID
- Parameters:
- o- the other ID to compare to. Will not be- null.
- Returns:
- the appropriate value as per Comparablecontract.
 
 - 
namespaceEqualsprotected boolean namespaceEquals(BaseID o) Description copied from class:BaseIDCalled byNamespace.testIDEquals(BaseID, BaseID).- Specified by:
- namespaceEqualsin class- BaseID
- Parameters:
- o- the other ID to test against. May be- null.
- Returns:
- trueif this ID is equal to the given ID.- falseotherwise.
 
 - 
namespaceGetNameprotected String namespaceGetName() Description copied from class:BaseIDCalled byNamespace.getNameForID(BaseID).- Specified by:
- namespaceGetNamein class- BaseID
- Returns:
- String name for this ID. Must not be null. Value returned should be unique within this Namespace.
 
 - 
namespaceHashCodeprotected int namespaceHashCode() Description copied from class:BaseIDCalled byNamespace.getHashCodeForID(BaseID).- Specified by:
- namespaceHashCodein class- BaseID
- Returns:
- int hashCode for this ID. Returned value must be unique within this process.
 
 - 
toStringpublic String toString() 
 - 
getNamingAuthoritypublic String getNamingAuthority() - Specified by:
- getNamingAuthorityin interface- IServiceTypeID
- Returns:
- String Naming Authority for this ServiceType.  Will not be null. If this instance has been created with the provider specific default, this will returnIServiceTypeID.DEFAULT_NAinstead.
 
 - 
getProtocolspublic String[] getProtocols() - Specified by:
- getProtocolsin interface- IServiceTypeID
- Returns:
- String[] of protocols supported.  Will not be null, but may be empty array. If this instance has been created with the provider specific default, this will returnIServiceTypeID.DEFAULT_PROTOinstead.
 
 - 
getScopespublic String[] getScopes() - Specified by:
- getScopesin interface- IServiceTypeID
- Returns:
- The scopes in which this Service is registered.  Will not be null, but may be empty array. If this instance has been created with the provider specific default, this will returnIServiceTypeID.DEFAULT_SCOPEinstead!
 
 - 
getServicespublic String[] getServices() - Specified by:
- getServicesin interface- IServiceTypeID
- Returns:
- The name of the service type.  If the underlying discovery mechanism
         supports naming hierarchies, the hierarchy will be returned
         flattened as an array.  Will not be null, but may be empty array.
 
 - 
equalspublic boolean equals(Object o) 
 - 
hashCodepublic int hashCode() 
 - 
getInternalpublic String getInternal() Description copied from interface:IServiceTypeIDGet the internal name of the service type. Provider implementations may choose to have this return the same value asID.getName(), or they may return a different, internal value appropriate to the provider.- Specified by:
- getInternalin interface- IServiceTypeID
- Returns:
- String internal name for this service type.  Will not return null.
 
 
- 
 
-