Class AddressingUtils

java.lang.Object
org.gcube.common.clients.builders.AddressingUtils

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name of the element used to wrap resource keys in endpoint references.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String contextPath, String service, String host, int port)
    Return the HTTP address of a service endpoint.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String protocol, String contextPath, String service, String host, int port)
    Return the address of a service endpoint.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String contextPath, String service, String namespace, String key, String host, int port)
    Returns the address of a service instance.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String protocol, String contextPath, String service, String namespace, String key, String host, int port)
    Returns the address of a service instance.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String contextPath, String service, String namespace, String key, URI address)
    Returns the address of a service instance.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String contextPath, String service, String namespace, String key, URL address)
    Returns the address of a service instance.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String protocol, String contextPath, String service, URL address)
    Return the address of a service endpoint.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String contextPath, String service, URI address)
    Return the address of a service endpoint.
    static jakarta.xml.ws.wsaddressing.W3CEndpointReference
    address(String contextPath, String service, URL address)
    Return the address of a service endpoint.
    static Element
    key(String namespace, String value)
    Returns an element that wraps a given key.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • keyElement

      public static final String keyElement
      The name of the element used to wrap resource keys in endpoint references.
      See Also:
  • Constructor Details

    • AddressingUtils

      public AddressingUtils()
  • Method Details

    • address

      public static jakarta.xml.ws.wsaddressing.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 jakarta.xml.ws.wsaddressing.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 jakarta.xml.ws.wsaddressing.W3CEndpointReference address(String contextPath, String service, URL address) throws IllegalArgumentException
      Return the address of a service endpoint.
      Parameters:
      contextPath - the context path of the service
      service - the name of the service
      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 jakarta.xml.ws.wsaddressing.W3CEndpointReference address(String protocol, String contextPath, String service, URL address) throws IllegalArgumentException
      Return the address of a service endpoint.
      Parameters:
      contextPath - the context path of the service
      service - the name of the service
      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 jakarta.xml.ws.wsaddressing.W3CEndpointReference address(String contextPath, String service, URI address) throws IllegalArgumentException
      Return the address of a service endpoint.
      Parameters:
      contextPath - the context path of the service
      service - the name of the service
      address - the address of the endpoint as a URI
      Returns:
      the address
      Throws:
      IllegalArgumentException - if an address cannot be derived from the inputs
    • address

      public static jakarta.xml.ws.wsaddressing.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 jakarta.xml.ws.wsaddressing.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 jakarta.xml.ws.wsaddressing.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 jakarta.xml.ws.wsaddressing.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
    • key

      public static Element key(String namespace, String value)
      Returns an element that wraps a given key.
      Parameters:
      namespace - the namespace of the element
      value - the value of the key
      Returns:
      the element