public class ServerUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME_REGEX
The value must be a combination of letters and digits
It must start with a letter and cannot exceed 50 characters
|
| Constructor and Description |
|---|
ServerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getScheme(String host) |
static boolean |
isHostDomain(String host)
method description Is it a domain name
|
static boolean |
isHostIp(String host)
method description Is it an IP address
|
static boolean |
isName(String param)
Verification rule:
The value must be a combination of letters and digits
It must start with a letter and cannot exceed 50 characters
|
static boolean |
isReachable(String ip,
Integer port,
int timeout)
Determine whether the IP and Port can be connected
|
public static final String NAME_REGEX
public static boolean isName(String param)
param - public static boolean isHostIp(String host)
host - public static boolean isHostDomain(String host)
host - Copyright © 2023. All rights reserved.