Class ProviderId


  • public class ProviderId
    extends Object
    External identity of a 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.

    • 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 identifier
        ancillary - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object