public class ProviderId
extends java.lang.Object
Provider
family.
It also carriers two designations of external characteristics, the URI
scheme and primary/ancillary indicator.
The device URI scheme is used to determine applicability of a provider to operations on a specific device. The ancillary indicator serves to designate a provider as a primary or ancillary.
A ProviderRegistry
uses this designation
to permit only one primary provider per device URI scheme. Multiple
ancillary providers can register with the same device URI scheme however.
Modifier and Type | Field and Description |
---|---|
static ProviderId |
NONE
Represents no provider ID.
|
Constructor and Description |
---|
ProviderId(java.lang.String scheme,
java.lang.String id)
Creates a new primary provider identifier from the specified string.
|
ProviderId(java.lang.String scheme,
java.lang.String id,
boolean ancillary)
Creates a new provider identifier from the specified string.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
id()
Returns the device URI scheme specific id portion.
|
boolean |
isAncillary()
Indicates whether this identifier designates an ancillary providers.
|
java.lang.String |
scheme()
Returns the device URI scheme to which this provider is bound.
|
java.lang.String |
toString() |
public static final ProviderId NONE
public ProviderId(java.lang.String scheme, java.lang.String id)
org.onosproject.provider.of.device
scheme
- device URI scheme to which this provider is bound, e.g. "of", "snmp"id
- string identifierpublic ProviderId(java.lang.String scheme, java.lang.String id, boolean ancillary)
org.onosproject.provider.of.device
scheme
- device URI scheme to which this provider is bound, e.g. "of", "snmp"id
- string identifierancillary
- ancillary provider indicatorpublic java.lang.String scheme()
public java.lang.String id()
public boolean isAncillary()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object