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 StringkeyElement
-
Constructor Summary
Constructors Constructor Description AddressingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static W3CEndpointReferenceaddress(String contextPath, String service, String host, int port)Return the HTTP address of a service endpoint.static W3CEndpointReferenceaddress(String protocol, String contextPath, String service, String host, int port)Return the address of a service endpoint.static W3CEndpointReferenceaddress(String contextPath, String service, String namespace, String key, String host, int port)Returns the address of a service instance.static W3CEndpointReferenceaddress(String protocol, String contextPath, String service, String namespace, String key, String host, int port)Returns the address of a service instance.static W3CEndpointReferenceaddress(String contextPath, String service, String namespace, String key, URI address)Returns the address of a service instance.static W3CEndpointReferenceaddress(String contextPath, String service, String namespace, String key, URL address)Returns the address of a service instance.static W3CEndpointReferenceaddress(String protocol, String contextPath, String service, URL address)Return the address of a service endpoint.static W3CEndpointReferenceaddress(String contextPath, String service, URI address)Return the address of a service endpoint.static W3CEndpointReferenceaddress(String contextPath, String service, URL address)Return the address of a service endpoint.static Elementkey(String namespace, String value)
-
-
-
Field Detail
-
keyElement
public static final String keyElement
- See Also:
- Constant Field Values
-
-
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 serviceservice- the name of the servicehost- the host of the endpointport- 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 serviceservice- the name of the servicehost- the host of the endpointport- 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, URL address) throws IllegalArgumentException
Return the address of a service endpoint.- Parameters:
contextPath- the context path of the serviceservice- the name of the serviceaddress- the address of the endpoint as aURL- 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, URL address) throws IllegalArgumentException
Return the address of a service endpoint.- Parameters:
contextPath- the context path of the serviceservice- the name of the serviceaddress- the address of the endpoint as aURL- Returns:
- the address
- Throws:
IllegalArgumentException- if an address cannot be derived from the inputs
-
address
public static W3CEndpointReference address(String contextPath, String service, URI address) throws IllegalArgumentException
Return the address of a service endpoint.- Parameters:
contextPath- the context path of the serviceservice- the name of the serviceaddress- the address of the endpoint as aURI- 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 serviceservice- the name of the servicenamespace- the namespace of the servicekey- the key of the instancehost- the host of the instanceport- 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 serviceservice- the name of the servicenamespace- the namespace of the servicekey- the key of the instancehost- the host of the instanceport- 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 serviceservice- the name of the servicenamespace- the namespace of the servicekey- the key of the instanceaddress- the address of the endpoint as aURL.- 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 serviceservice- the name of the servicenamespace- the namespace of the servicekey- the key of the instanceaddress- the address of the endpoint as aURI.- Returns:
- the address
- Throws:
IllegalArgumentException- if an address cannot be derived from the inputs
-
-