tom

Adding javadocs for ProviderId changes.

...@@ -5,7 +5,17 @@ import java.util.Objects; ...@@ -5,7 +5,17 @@ import java.util.Objects;
5 import static com.google.common.base.MoreObjects.toStringHelper; 5 import static com.google.common.base.MoreObjects.toStringHelper;
6 6
7 /** 7 /**
8 - * Notion of provider identity. 8 + * External identity of a {@link org.onlab.onos.net.provider.Provider} family.
9 + * It also carriers two designations of external characteristics, the URI
10 + * scheme and primary/ancillary indicator.
11 + * <p/>
12 + * The device URI scheme is used to determine applicability of a provider to
13 + * operations on a specific device. The ancillary indicator serves to designate
14 + * a provider as a primary or ancillary.
15 + *
16 + * A {@link org.onlab.onos.net.provider.ProviderRegistry} uses this designation
17 + * to permit only one primary provider per device URI scheme. Multiple
18 + * ancillary providers can register with the same device URI scheme however.
9 */ 19 */
10 public class ProviderId { 20 public class ProviderId {
11 21
...@@ -14,7 +24,7 @@ public class ProviderId { ...@@ -14,7 +24,7 @@ public class ProviderId {
14 private final boolean ancillary; 24 private final boolean ancillary;
15 25
16 /** 26 /**
17 - * Creates a new provider identifier from the specified string. 27 + * Creates a new primary provider identifier from the specified string.
18 * The providers are expected to follow the reverse DNS convention, e.g. 28 * The providers are expected to follow the reverse DNS convention, e.g.
19 * {@code org.onlab.onos.provider.of.device} 29 * {@code org.onlab.onos.provider.of.device}
20 * 30 *
...@@ -50,21 +60,21 @@ public class ProviderId { ...@@ -50,21 +60,21 @@ public class ProviderId {
50 } 60 }
51 61
52 /** 62 /**
53 - * Indicates whether the provider id belongs to an ancillary provider. 63 + * Returns the device URI scheme specific id portion.
54 * 64 *
55 - * @return true for ancillary; false for primary provider 65 + * @return id
56 */ 66 */
57 - public boolean isAncillary() { 67 + public String id() {
58 - return ancillary; 68 + return id;
59 } 69 }
60 70
61 /** 71 /**
62 - * Returns the device URI scheme specific id portion. 72 + * Indicates whether this identifier designates an ancillary providers.
63 * 73 *
64 - * @return id 74 + * @return true if the provider is ancillary; false if primary
65 */ 75 */
66 - public String id() { 76 + public boolean isAncillary() {
67 - return id; 77 + return ancillary;
68 } 78 }
69 79
70 @Override 80 @Override
......