Class UndertowHelper
- java.lang.Object
-
- org.apache.camel.component.undertow.UndertowHelper
-
public final class UndertowHelper extends Object
Helper class for useful methods used all over the component
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
appendHeader(Map<String,Object> headers, String key, Object value)
static io.undertow.util.HttpString
createMethod(org.apache.camel.Exchange exchange, UndertowEndpoint endpoint, boolean hasPayload)
Creates the HttpMethod to use to call the remote server, often either its GET or POST.static URI
createURI(org.apache.camel.Exchange exchange, String url, UndertowEndpoint endpoint)
Creates the URI to invoke.static String
createURL(org.apache.camel.Exchange exchange, UndertowEndpoint endpoint)
Creates the URL to invoke.static URI
makeHttpURI(String httpURI)
static URI
makeHttpURI(URI httpURI)
-
-
-
Method Detail
-
createURL
public static String createURL(org.apache.camel.Exchange exchange, UndertowEndpoint endpoint)
Creates the URL to invoke.- Parameters:
exchange
- the exchangeendpoint
- the endpoint- Returns:
- the URL to invoke
-
createURI
public static URI createURI(org.apache.camel.Exchange exchange, String url, UndertowEndpoint endpoint) throws URISyntaxException
Creates the URI to invoke.- Parameters:
exchange
- the exchangeurl
- the url to invokeendpoint
- the endpoint- Returns:
- the URI to invoke
- Throws:
URISyntaxException
-
appendHeader
public static void appendHeader(Map<String,Object> headers, String key, Object value)
-
createMethod
public static io.undertow.util.HttpString createMethod(org.apache.camel.Exchange exchange, UndertowEndpoint endpoint, boolean hasPayload) throws URISyntaxException
Creates the HttpMethod to use to call the remote server, often either its GET or POST.- Throws:
URISyntaxException
-
-