blob: 3e274b31e250f44b72b8bebe2ee9d800935600d6 [file] [log] [blame]
tom80c0e5e2014-09-08 18:08:58 -07001package org.onlab.onos.net;
2
3import java.net.URI;
4
5/**
6 * Immutable representation of a host identity.
7 */
8public final class HostId extends ElementId {
9
10 // Public construction is prohibited
11 private HostId(URI uri) {
12 super(uri);
13 }
14
15 /**
16 * Creates a device id using the supplied URI.
17 *
18 * @param uri device URI
19 */
20 public static HostId hostId(URI uri) {
21 return new HostId(uri);
22 }
23
24 /**
25 * Creates a device id using the supplied URI string.
26 *
27 * @param string device URI string
28 */
29 public static HostId hostId(String string) {
tom568581d2014-09-08 20:13:36 -070030 return hostId(URI.create(string));
tom80c0e5e2014-09-08 18:08:58 -070031 }
32
33}