public class UriUtil extends Object
UriUtil class.
| Modifier and Type | Class and Description |
|---|---|
static class |
UriUtil.MessageFormat |
| Modifier and Type | Field and Description |
|---|---|
static int |
HTTP_DISCOVERY_PORT |
static int |
HTTP_PORT |
static String |
HTTPS_BINARY_TRANSPORT_PROFILE_URI
Constant
HTTPS_BINARY_TRANSPORT_PROFILE_URI="http://opcfoundation.org/UA-Profile/Tra"{trunked} |
static int |
HTTPS_DISCOVERY_PORT |
static int |
HTTPS_PORT |
static int |
OPC_TCP_DISCOVERY_PORT |
static int |
OPC_TCP_PORT |
static Pattern |
PATTERN_HTTP |
static Pattern |
PATTERN_HTTPS |
static Pattern |
PATTERN_OPCTCP |
static Pattern |
PATTERN_URI |
static String |
SCHEME_HTTP |
static String |
SCHEME_HTTPS |
static String |
SCHEME_OPCTCP |
static String |
SOAP_XML_TRANSPORT_PROFILE_URI
Constant
SOAP_XML_TRANSPORT_PROFILE_URI="http://opcfoundation.org/UA-Profile/Tra"{trunked} |
static String |
UATCP_BINARY_TRANSPORT_PROFILE_URI
Constant
UATCP_BINARY_TRANSPORT_PROFILE_URI="http://opcfoundation.org/UA-Profile/Tra"{trunked} |
| Constructor and Description |
|---|
UriUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
defaultPort(String scheme)
defaultPort.
|
static String |
getEndpointName(String uri)
Get the resource part of an URI
|
static UriUtil.MessageFormat |
getMessageFormat(String endpointUri)
Get message format associated with an endpoint
|
static int |
getPort(String endpointUrl)
getPort.
|
static InetSocketAddress |
getSocketAddress(String endpointUri)
Convert uri to socket address
|
static InetSocketAddress |
getSocketAddress(URI endpointUri)
Deprecated.
URI usage should be avoided due to
https://bugs.openjdk.java.net/browse/JDK-8199396, it cannot currently deal with
IPv6 scope ids with the hyphen '-' character, and some linux distros use them in
network interface names. |
static String |
getTransportProtocol(String endpointUri)
Get the transport protocol of an endpoint
|
public static final int OPC_TCP_PORT
public static final int HTTP_PORT
public static final int HTTPS_PORT
public static final int OPC_TCP_DISCOVERY_PORT
public static final int HTTPS_DISCOVERY_PORT
public static final int HTTP_DISCOVERY_PORT
public static final String SCHEME_OPCTCP
public static final String SCHEME_HTTP
public static final String SCHEME_HTTPS
public static final Pattern PATTERN_HTTPS
public static final Pattern PATTERN_HTTP
public static final Pattern PATTERN_OPCTCP
public static final Pattern PATTERN_URI
public static final String SOAP_XML_TRANSPORT_PROFILE_URI
SOAP_XML_TRANSPORT_PROFILE_URI="http://opcfoundation.org/UA-Profile/Tra"{trunked}public static final String UATCP_BINARY_TRANSPORT_PROFILE_URI
UATCP_BINARY_TRANSPORT_PROFILE_URI="http://opcfoundation.org/UA-Profile/Tra"{trunked}public static final String HTTPS_BINARY_TRANSPORT_PROFILE_URI
HTTPS_BINARY_TRANSPORT_PROFILE_URI="http://opcfoundation.org/UA-Profile/Tra"{trunked}public static int defaultPort(String scheme)
defaultPort.
scheme - a String object.public static UriUtil.MessageFormat getMessageFormat(String endpointUri) throws ServiceResultException
endpointUri - a String object.ServiceResultException - Bad_ServerUriInvalid if the
protocol is unknownpublic static int getPort(String endpointUrl)
getPort.
endpointUrl - a String object.public static InetSocketAddress getSocketAddress(String endpointUri) throws ServiceResultException
endpointUri - a String object.InetSocketAddress object.ServiceResultException - if any.@Deprecated public static InetSocketAddress getSocketAddress(URI endpointUri)
URI usage should be avoided due to
https://bugs.openjdk.java.net/browse/JDK-8199396, it cannot currently deal with
IPv6 scope ids with the hyphen '-' character, and some linux distros use them in
network interface names.getSocketAddress.
endpointUri - a URI object.InetSocketAddress object.Copyright © 2026. All rights reserved.