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
ServiceTypeID base class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected String
protected String[]
protected String[]
protected String[]
protected String
Fields inherited from interface org.eclipse.ecf.discovery.identity.IServiceTypeID
DEFAULT_NA, DEFAULT_PROTO, DEFAULT_SCOPE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ServiceTypeID
(Namespace namespace) ServiceTypeID
(Namespace namespace, String aType) Clients should not call this method directly.protected
ServiceTypeID
(Namespace namespace, String[] services, String[] scopes, String[] protocols, String namingAuthority) protected
ServiceTypeID
(Namespace ns, IServiceTypeID id) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
boolean
Get the internal name of the service type.getName()
Get the unique name of this identity.String[]
String[]
String[]
int
hashCode()
protected int
protected boolean
Called byNamespace.testIDEquals(BaseID, BaseID)
.protected String
Called byNamespace.getNameForID(BaseID)
.protected int
Called byNamespace.getHashCodeForID(BaseID)
.toString()
Methods inherited from class org.eclipse.ecf.core.identity.BaseID
compareTo, getAdapter, 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
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 theNamespace
and/orServiceIDFactory
instead.- Parameters:
namespace
- namespace should not benull
aType
- type should not benull
-
-
Method Details
-
createType
protected void createType() -
getName
Description copied from interface:ID
Get the unique name of this identity. -
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.
-
toString
-
getNamingAuthority
- Specified by:
getNamingAuthority
in 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_NA
instead.
-
getProtocols
- Specified by:
getProtocols
in 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_PROTO
instead.
-
getScopes
- Specified by:
getScopes
in 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_SCOPE
instead!
-
getServices
- Specified by:
getServices
in 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:IServiceTypeID
Get 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:
getInternal
in interfaceIServiceTypeID
- Returns:
- String internal name for this service type. Will not return
null
.
-