blob: e55737da18d7287925e75576b4254a4ba41d922d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;
import ai.vespa.http.DomainName;
import static ai.vespa.validation.Validation.requireLength;
/**
* Hostnames match {@link #domainNamePattern}, and are restricted to 64 characters in length.
*
* @author jonmv
*/
public class HostName extends DomainName {
private HostName(String value) {
super(requireLength(value, "hostname length", 1, 64));
}
public static HostName of(String value) {
return new HostName(value);
}
}
|