tom

Adding javadocs for ProviderId changes.

......@@ -5,7 +5,17 @@ import java.util.Objects;
import static com.google.common.base.MoreObjects.toStringHelper;
/**
* Notion of provider identity.
* External identity of a {@link org.onlab.onos.net.provider.Provider} family.
* It also carriers two designations of external characteristics, the URI
* scheme and primary/ancillary indicator.
* <p/>
* 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 {@link org.onlab.onos.net.provider.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.
*/
public class ProviderId {
......@@ -14,7 +24,7 @@ public class ProviderId {
private final boolean ancillary;
/**
* Creates a new provider identifier from the specified string.
* Creates a new primary provider identifier from the specified string.
* The providers are expected to follow the reverse DNS convention, e.g.
* {@code org.onlab.onos.provider.of.device}
*
......@@ -50,21 +60,21 @@ public class ProviderId {
}
/**
* Indicates whether the provider id belongs to an ancillary provider.
* Returns the device URI scheme specific id portion.
*
* @return true for ancillary; false for primary provider
* @return id
*/
public boolean isAncillary() {
return ancillary;
public String id() {
return id;
}
/**
* Returns the device URI scheme specific id portion.
* Indicates whether this identifier designates an ancillary providers.
*
* @return id
* @return true if the provider is ancillary; false if primary
*/
public String id() {
return id;
public boolean isAncillary() {
return ancillary;
}
@Override
......