Package org.onosproject.net.provider
Class ProviderId
- java.lang.Object
-
- org.onosproject.net.provider.ProviderId
-
public class ProviderId extends Object
External identity of aProvider
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.
-
-
Field Summary
Fields Modifier and Type Field Description static ProviderId
NONE
Represents no provider ID.
-
Constructor Summary
Constructors Constructor Description ProviderId(String scheme, String id)
Creates a new primary provider identifier from the specified string.ProviderId(String scheme, String id, boolean ancillary)
Creates a new provider identifier from the specified string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
int
hashCode()
String
id()
Returns the device URI scheme specific id portion.boolean
isAncillary()
Indicates whether this identifier designates an ancillary providers.String
scheme()
Returns the device URI scheme to which this provider is bound.String
toString()
-
-
-
Field Detail
-
NONE
public static final ProviderId NONE
Represents no provider ID.
-
-
Constructor Detail
-
ProviderId
public ProviderId(String scheme, String id)
Creates a new primary provider identifier from the specified string. The providers are expected to follow the reverse DNS convention, e.g.org.onosproject.provider.of.device
- Parameters:
scheme
- device URI scheme to which this provider is bound, e.g. "of", "snmp"id
- string identifier
-
ProviderId
public ProviderId(String scheme, String id, boolean ancillary)
Creates a new provider identifier from the specified string. The providers are expected to follow the reverse DNS convention, e.g.org.onosproject.provider.of.device
- Parameters:
scheme
- device URI scheme to which this provider is bound, e.g. "of", "snmp"id
- string identifierancillary
- ancillary provider indicator
-
-
Method Detail
-
scheme
public String scheme()
Returns the device URI scheme to which this provider is bound.- Returns:
- device URI scheme
-
id
public String id()
Returns the device URI scheme specific id portion.- Returns:
- id
-
isAncillary
public boolean isAncillary()
Indicates whether this identifier designates an ancillary providers.- Returns:
- true if the provider is ancillary; false if primary
-
-