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
ServiceTypeID base class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected Stringprotected String[]protected String[]protected String[]protected StringFields inherited from interface org.eclipse.ecf.discovery.identity.IServiceTypeID
DEFAULT_NA, DEFAULT_PROTO, DEFAULT_SCOPE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServiceTypeID(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 Summary
Modifier and TypeMethodDescriptionprotected voidbooleanGet the internal name of the service type.getName()Get the unique name of this identity.String[]String[]String[]inthashCode()protected intprotected booleanCalled byNamespace.testIDEquals(BaseID, BaseID).protected StringCalled byNamespace.getNameForID(BaseID).protected intCalled byNamespace.getHashCodeForID(BaseID).toString()Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, getAdapter, getNamespace, namespaceToExternalForm, toExternalFormMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.ecf.core.identity.ID
getNamespace, toExternalForm
-
Field Details
-
DELIM
- See Also:
-
typeName
-
namingAuthority
-
protocols
-
scopes
-
services
-
-
Constructor Details
-
ServiceTypeID
-
ServiceTypeID
-
ServiceTypeID
-
ServiceTypeID
Clients should not call this method directly. Use theNamespaceand/orServiceIDFactoryinstead.- Parameters:
namespace- namespace should not benullaType- type should not benull
-
-
Method Details
-
createType
protected void createType() -
getName
Description copied from interface:IDGet the unique name of this identity. -
namespaceCompareTo
Description copied from class:BaseID- Specified by:
namespaceCompareToin classBaseID- Parameters:
o- the other ID to compare to. Will not benull.- Returns:
- the appropriate value as per
Comparablecontract.
-
namespaceEquals
Description copied from class:BaseIDCalled byNamespace.testIDEquals(BaseID, BaseID).- Specified by:
namespaceEqualsin classBaseID- Parameters:
o- the other ID to test against. May benull.- Returns:
trueif this ID is equal to the given ID.falseotherwise.
-
namespaceGetName
Description copied from class:BaseIDCalled byNamespace.getNameForID(BaseID).- Specified by:
namespaceGetNamein 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:BaseIDCalled byNamespace.getHashCodeForID(BaseID).- Specified by:
namespaceHashCodein classBaseID- Returns:
- int hashCode for this ID. Returned value must be unique within this process.
-
toString
-
getNamingAuthority
- Specified by:
getNamingAuthorityin interfaceIServiceTypeID- 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.
-
getProtocols
- Specified by:
getProtocolsin interfaceIServiceTypeID- 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.
-
getScopes
- Specified by:
getScopesin interfaceIServiceTypeID- 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!
-
getServices
- Specified by:
getServicesin interfaceIServiceTypeID- 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.
-
equals
-
hashCode
public int hashCode() -
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 interfaceIServiceTypeID- Returns:
- String internal name for this service type. Will not return
null.
-