public interface HTTPSupport
Modifier and Type | Method and Description |
---|---|
void |
addPreemptiveBasicAuthentication(Message msg,
String username,
String password)
Adds an HTTP transport header for pre-emptive basic authentication for this message.
|
void |
addPreemptiveBasicAuthentication(Message msg,
String username,
String password,
String charset,
boolean proxy)
Adds an HTTP transport header for pre-emptive basic authentication for this message.
|
void |
addRequestParameter(Message msg,
String name,
String value)
Add an outgoing query parameter with the given name
|
String[] |
getAuthenticatedRolesArray(Message msg)
Retrieved the the authenticated user roles of the given message as a String array
|
String |
getAuthenticatedRolesString(Message msg)
Retrieved the the authenticated user roles as a serialized String of the given message
|
String |
getAuthenticatedUsername(Message msg)
Gets the authenticated username of the given message
|
String |
getCookie(Message msg,
String name)
Return the value of the cookie with the given name
|
String |
getFirstRequestParameter(Message msg,
String key)
Return the first request query parameter with the given name
|
String |
getJvmRoute(Message msg)
Return the jvmRoute from the JSESSIONID cookie or jsessionid URL parameter of an HTTP/S request
|
String |
getLocalAddress(Message msg)
Gets the local address of the network interface via which the given message has been received to the ESB
|
int |
getLocalPort(Message msg)
Gets the local socket port used in receiving the current message
|
HttpConstants.Method |
getMethod(Message msg)
Retrieves the given methods receiving HTTP method, could be one of;
HttpConstants.Method.GET
HttpConstants.Method.POST
HttpConstants.Method.PUT
HttpConstants.Method.DELETE
HttpConstants.Method.HEAD
HttpConstants.Method.OPTIONS
HttpConstants.Method.PATCH
|
String |
getQueryString(Message msg)
Gives a String representation of URL query parameters of the given message received over HTTP/S transport.
|
long |
getReceivedEntitySize(Message msg)
Retrieves the size of the received HTTP entity of the given message - This is only available for requests and
responses received and not for messages about to be sent out
|
long |
getReceivedHeaderSize(Message msg)
Retrieves the size of the received header over HTTP, of the given message - This is only available for requests
and responses received and not for messages about to be sent out
|
long |
getReceivedMessageSize(Message msg)
Retrieves the size of the received message over HTTP, of the given message - This is only available for requests
and responses received and not for messages about to be sent out
|
String |
getRemoteAddress(Message msg)
Gets the remote address of the given message
|
int |
getRemotePort(Message msg)
Gets the remote port of the given message
|
Map<String,List<String>> |
getRequestParameterMap(Message msg)
Return the query parameters as a Map
|
List<String> |
getRequestParameterValues(Message msg,
String key)
Return the list of query parameters for the given name/key
|
String |
getServiceURL(Message msg)
Retrieves the service URL of the given message as seen at the message arrival to the ESB
|
boolean |
isHessian(Message msg)
Check the message content type to see if it indicates a Hessian message
|
List<String> |
removeRequestParameter(Message msg,
String key)
Remove the request query parameter with the given name
|
void |
setAuthenticationCredentials(Message msg,
String username,
String password)
Sets the authentication username and password to be used by HTTP authenticators
|
void |
setAuthenticationCredentials(Message msg,
String username,
String password,
String scheme)
Sets the authentication username and password and scheme to be used by HTTP authenticators
|
void |
setCookie(Message msg,
String name,
String value)
Set a HTTP cookie on the message
|
void |
setCookie(Message msg,
String name,
String value,
String path,
int age)
Set a HTTP cookie on the message
|
void |
setCookie(Message msg,
String name,
String value,
String path,
String domain,
int age,
boolean secure)
Set a HTTP cookie on the message
|
void |
setForcedHost(Message msg,
String hostName)
Forces the specified host name for any HTTP request going out after this call through the HTTP transport
|
void |
setForwardUrlPostfix(Message msg,
String postfix)
Appends the given postfix to the HTTP url of the given message
|
void |
setMethod(Message msg,
HttpConstants.Method method)
Sets the HTTP method for the current message effective for the next HTTP send action
|
void |
setNTLMAuthenticationCredentials(Message msg,
String username,
String password,
String domain,
String workstation)
Sets the authentication username and password to be used by HTTP authenticators
|
String getJvmRoute(Message msg)
msg
- the current messageString getCookie(Message msg, String name)
msg
- message to extract cookie fromname
- the name of the cookievoid setCookie(Message msg, String name, String value, String path, String domain, int age, boolean secure)
msg
- the response message to set the cookie onname
- name of the cookievalue
- value of the cookiepath
- the path for the cookiedomain
- the domain for the cookieage
- the max age for the cookiesecure
- true if cookie is securevoid setCookie(Message msg, String name, String value, String path, int age)
msg
- the response message to set the cookie onname
- name of the cookievalue
- value of the cookiepath
- the path for the cookieage
- the max age for the cookievoid setCookie(Message msg, String name, String value)
msg
- the response message to set the cookie onname
- name of the cookievalue
- value of the cookievoid addPreemptiveBasicAuthentication(Message msg, String username, String password, String charset, boolean proxy)
msg
- the message to add an HTTP 'Authorization' header for basic authenticationusername
- the usernamepassword
- the passwordcharset
- the character set for the credentialsproxy
- if header should be for proxy authentication or WWW authenticationvoid addPreemptiveBasicAuthentication(Message msg, String username, String password)
msg
- the message to add an HTTP 'Authorization' header for basic authenticationusername
- the username in US-ASCII character setpassword
- the password in US-ASCII character setboolean isHessian(Message msg)
msg
- the message to detectString getFirstRequestParameter(Message msg, String key)
msg
- the messagekey
- the name or key of the query parameterList<String> removeRequestParameter(Message msg, String key)
msg
- the messagekey
- the name or key of the query parametervoid addRequestParameter(Message msg, String name, String value)
msg
- message to set the outgoing query parameter toname
- the name of the query parametervalue
- the value of the query parameterMap<String,List<String>> getRequestParameterMap(Message msg)
msg
- the messageList<String> getRequestParameterValues(Message msg, String key)
msg
- the messagekey
- the name or keyString getRemoteAddress(Message msg)
msg
- the message of which the remote address to be retrievedint getRemotePort(Message msg)
msg
- the message of which the remote port to be retrievedString getLocalAddress(Message msg)
msg
- the message of which the local address to be retrievedint getLocalPort(Message msg)
msg
- the message of which the local port to be retrievedHttpConstants.Method getMethod(Message msg)
msg
- the message of which the received HTTP method to be retrievedvoid setMethod(Message msg, HttpConstants.Method method)
msg
- the message to which the HTTP method to be setmethod
- the HTTP method to be setlong getReceivedMessageSize(Message msg)
msg
- the message of which the received size to be retrievedlong getReceivedHeaderSize(Message msg)
msg
- the message of which the received header size to be retrievedlong getReceivedEntitySize(Message msg)
msg
- the message of which the received entity size to be retrievedString getAuthenticatedUsername(Message msg)
msg
- the message of which the authenticated username to be fetchedString getAuthenticatedRolesString(Message msg)
msg
- the message of which the authenticated roles to be fetchedString[] getAuthenticatedRolesArray(Message msg)
msg
- the message of which the authenticated user roles to be fetchedvoid setAuthenticationCredentials(Message msg, String username, String password)
msg
- the message to which the authentication credentials to be setusername
- the authentication username to be setpassword
- the authentication password to be setvoid setAuthenticationCredentials(Message msg, String username, String password, String scheme)
msg
- the message to which the authentication credentials to be setusername
- the authentication username to be setpassword
- the authentication password to be setscheme
- the authentication scheme to be setvoid setNTLMAuthenticationCredentials(Message msg, String username, String password, String domain, String workstation)
msg
- the message to which the authentication credentials to be setusername
- the authentication username to be setpassword
- the authentication password to be setdomain
- the authentication NTLM domain to be setString getServiceURL(Message msg)
msg
- the message of which the received service URL to be fetchedString getQueryString(Message msg)
msg
- the message of which the query string to be retrievedvoid setForcedHost(Message msg, String hostName)
msg
- the message to which the forced host header is sethostName
- the host name to be forced regardless of the endpoint addressCopyright © 2010–2016 AdroitLogic. All rights reserved.