Class AddressingUtils


  • public class AddressingUtils
    extends Object
    Factory methods for addresses of service endpoints and service instances.
    Author:
    Fabio Simeoni
    • Constructor Detail

      • AddressingUtils

        public AddressingUtils()
    • Method Detail

      • address

        public static W3CEndpointReference address​(String contextPath,
                                                   String service,
                                                   String host,
                                                   int port)
                                            throws IllegalArgumentException
        Return the HTTP address of a service endpoint.
        Parameters:
        contextPath - the context path of the service
        service - the name of the service
        host - the host of the endpoint
        port - the port of the endpoint
        Returns:
        the address
        Throws:
        IllegalArgumentException - if an address cannot be derived from the inputs
      • address

        public static W3CEndpointReference address​(String protocol,
                                                   String contextPath,
                                                   String service,
                                                   String host,
                                                   int port)
                                            throws IllegalArgumentException
        Return the address of a service endpoint.
        Parameters:
        protocol - the protocol required to contact endpoint (e.g. HTTPS)
        contextPath - the context path of the service
        service - the name of the service
        host - the host of the endpoint
        port - the port of the endpoint
        Returns:
        the address
        Throws:
        IllegalArgumentException - if an address cannot be derived from the inputs
      • address

        public static W3CEndpointReference address​(String contextPath,
                                                   String service,
                                                   String namespace,
                                                   String key,
                                                   String host,
                                                   int port)
                                            throws IllegalArgumentException
        Returns the address of a service instance.
        Parameters:
        contextPath - the context path of the service
        service - the name of the service
        namespace - the namespace of the service
        key - the key of the instance
        host - the host of the instance
        port - the port of the instance
        Returns:
        the address
        Throws:
        IllegalArgumentException - if an address cannot be derived from the inputs
      • address

        public static W3CEndpointReference address​(String protocol,
                                                   String contextPath,
                                                   String service,
                                                   String namespace,
                                                   String key,
                                                   String host,
                                                   int port)
                                            throws IllegalArgumentException
        Returns the address of a service instance.
        Parameters:
        protocol - the protocol required to contact endpoint (e.g. HTTPS)
        contextPath - the context path of the service
        service - the name of the service
        namespace - the namespace of the service
        key - the key of the instance
        host - the host of the instance
        port - the port of the instance
        Returns:
        the address
        Throws:
        IllegalArgumentException - if an address cannot be derived from the inputs
      • address

        public static W3CEndpointReference address​(String contextPath,
                                                   String service,
                                                   String namespace,
                                                   String key,
                                                   URL address)
                                            throws IllegalArgumentException
        Returns the address of a service instance.
        Parameters:
        contextPath - the context path of the service
        service - the name of the service
        namespace - the namespace of the service
        key - the key of the instance
        address - the address of the endpoint as a URL.
        Returns:
        the address
        Throws:
        IllegalArgumentException - if an address cannot be derived from the inputs
      • address

        public static W3CEndpointReference address​(String contextPath,
                                                   String service,
                                                   String namespace,
                                                   String key,
                                                   URI address)
                                            throws IllegalArgumentException
        Returns the address of a service instance.
        Parameters:
        contextPath - the context path of the service
        service - the name of the service
        namespace - the namespace of the service
        key - the key of the instance
        address - the address of the endpoint as a URI.
        Returns:
        the address
        Throws:
        IllegalArgumentException - if an address cannot be derived from the inputs