org.opcfoundation.ua.transport
Class UriUtil

java.lang.Object
  extended by org.opcfoundation.ua.transport.UriUtil

public class UriUtil
extends Object

UriUtil class.


Nested Class Summary
static class UriUtil.MessageFormat
           
 
Field Summary
static int HTTP_DISCOVERY_PORT
          Constant HTTP_DISCOVERY_PORT=56201
static int HTTP_PORT
          Constant HTTP_PORT=80
static int HTTPS_DISCOVERY_PORT
          Constant HTTPS_DISCOVERY_PORT=4843
static int HTTPS_PORT
          Constant HTTPS_PORT=443
static int OPC_TCP_DISCOVERY_PORT
          Constant OPC_TCP_DISCOVERY_PORT=4840
static int OPC_TCP_PORT
          Constant OPC_TCP_PORT=6000
static Pattern PATTERN_HTTP
          Constant PATTERN_HTTP
static Pattern PATTERN_HTTPS
          Constant PATTERN_HTTPS
static Pattern PATTERN_OPCTCP
          Constant PATTERN_OPCTCP
static Pattern PATTERN_URI
          Constant PATTERN_URI
static String SCHEME_HTTP
          Constant SCHEME_HTTP="http"
static String SCHEME_HTTPS
          Constant SCHEME_HTTPS="https"
static String SCHEME_OPCTCP
          Constant SCHEME_OPCTCP="opc.tcp"
 
Constructor Summary
UriUtil()
           
 
Method Summary
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)
          getSocketAddress.
static String getTransportProtocol(String endpointUri)
          Get the transport protocol of an endpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPC_TCP_PORT

public static final int OPC_TCP_PORT
Constant OPC_TCP_PORT=6000

See Also:
Constant Field Values

HTTP_PORT

public static final int HTTP_PORT
Constant HTTP_PORT=80

See Also:
Constant Field Values

HTTPS_PORT

public static final int HTTPS_PORT
Constant HTTPS_PORT=443

See Also:
Constant Field Values

OPC_TCP_DISCOVERY_PORT

public static final int OPC_TCP_DISCOVERY_PORT
Constant OPC_TCP_DISCOVERY_PORT=4840

See Also:
Constant Field Values

HTTPS_DISCOVERY_PORT

public static final int HTTPS_DISCOVERY_PORT
Constant HTTPS_DISCOVERY_PORT=4843

See Also:
Constant Field Values

HTTP_DISCOVERY_PORT

public static final int HTTP_DISCOVERY_PORT
Constant HTTP_DISCOVERY_PORT=56201

See Also:
Constant Field Values

SCHEME_OPCTCP

public static final String SCHEME_OPCTCP
Constant SCHEME_OPCTCP="opc.tcp"

See Also:
Constant Field Values

SCHEME_HTTP

public static final String SCHEME_HTTP
Constant SCHEME_HTTP="http"

See Also:
Constant Field Values

SCHEME_HTTPS

public static final String SCHEME_HTTPS
Constant SCHEME_HTTPS="https"

See Also:
Constant Field Values

PATTERN_HTTPS

public static final Pattern PATTERN_HTTPS
Constant PATTERN_HTTPS


PATTERN_HTTP

public static final Pattern PATTERN_HTTP
Constant PATTERN_HTTP


PATTERN_OPCTCP

public static final Pattern PATTERN_OPCTCP
Constant PATTERN_OPCTCP


PATTERN_URI

public static final Pattern PATTERN_URI
Constant PATTERN_URI

Constructor Detail

UriUtil

public UriUtil()
Method Detail

getMessageFormat

public static UriUtil.MessageFormat getMessageFormat(String endpointUri)
                                              throws ServiceResultException
Get message format associated with an endpoint

Parameters:
endpointUri - a String object.
Returns:
transport protocol
Throws:
ServiceResultException - Bad_ServerUriInvalid if the protocol is unknown

getTransportProtocol

public static String getTransportProtocol(String endpointUri)
Get the transport protocol of an endpoint

Parameters:
endpointUri - a String object.
Returns:
transport protocol

getSocketAddress

public static InetSocketAddress getSocketAddress(String endpointUri)
                                          throws ServiceResultException
Convert uri to socket address

Parameters:
endpointUri - a String object.
Returns:
a InetSocketAddress object.
Throws:
ServiceResultException - if any.

getSocketAddress

public static InetSocketAddress getSocketAddress(URI endpointUri)

getSocketAddress.

Parameters:
endpointUri - a URI object.
Returns:
a InetSocketAddress object.

getEndpointName

public static String getEndpointName(String uri)
Get the resource part of an URI

Parameters:
uri - a String object.
Returns:
a String object.

getPort

public static int getPort(String endpointUrl)

getPort.

Parameters:
endpointUrl - a String object.
Returns:
a int.

defaultPort

public static int defaultPort(String scheme)

defaultPort.

Parameters:
scheme - a String object.
Returns:
a int.


Copyright © 2018. All rights reserved.