AdroitLogic UltraESB v1.7.0

org.adroitlogic.ultraesb.api.mediation
Interface HTTPSupport


public interface HTTPSupport

HTTP mediation support

Since:
1.7.0

Method Summary
 void addPreemptiveBasicAuthentication(Message msg, java.lang.String username, java.lang.String password)
          Adds an HTTP transport header for pre-emptive basic authentication for this message.
 void addPreemptiveBasicAuthentication(Message msg, java.lang.String username, java.lang.String password, java.lang.String charset, boolean proxy)
          Adds an HTTP transport header for pre-emptive basic authentication for this message.
 java.lang.String getCookie(Message msg, java.lang.String name)
          Return the value of the cookie with the given name
 java.lang.String getJvmRoute(Message msg)
          Return the jvmRoute from the JSESSIONID cookie or jsessionid URL parameter of an HTTP/S request
 boolean isHessian(Message msg)
          Check the message content type to see if it indicates a Hessian message
 void setCookie(Message msg, java.lang.String name, java.lang.String value)
          Set a HTTP cookie on the message
 void setCookie(Message msg, java.lang.String name, java.lang.String value, java.lang.String path, int age)
          Set a HTTP cookie on the message
 void setCookie(Message msg, java.lang.String name, java.lang.String value, java.lang.String path, java.lang.String domain, int age, boolean secure)
          Set a HTTP cookie on the message
 

Method Detail

getJvmRoute

java.lang.String getJvmRoute(Message msg)
Return the jvmRoute from the JSESSIONID cookie or jsessionid URL parameter of an HTTP/S request

Parameters:
msg - the current message
Returns:
the Tomcat jvmRoute from the session

getCookie

java.lang.String getCookie(Message msg,
                           java.lang.String name)
Return the value of the cookie with the given name

Parameters:
msg - message to extract cookie from
name - the name of the cookie
Returns:
the value of the cookie

setCookie

void setCookie(Message msg,
               java.lang.String name,
               java.lang.String value,
               java.lang.String path,
               java.lang.String domain,
               int age,
               boolean secure)
Set a HTTP cookie on the message

Parameters:
msg - the response message to set the cookie on
name - name of the cookie
value - value of the cookie
path - the path for the cookie
domain - the domain for the cookie
age - the max age for the cookie
secure - true if cookie is secure

setCookie

void setCookie(Message msg,
               java.lang.String name,
               java.lang.String value,
               java.lang.String path,
               int age)
Set a HTTP cookie on the message

Parameters:
msg - the response message to set the cookie on
name - name of the cookie
value - value of the cookie
path - the path for the cookie
age - the max age for the cookie

setCookie

void setCookie(Message msg,
               java.lang.String name,
               java.lang.String value)
Set a HTTP cookie on the message

Parameters:
msg - the response message to set the cookie on
name - name of the cookie
value - value of the cookie

addPreemptiveBasicAuthentication

void addPreemptiveBasicAuthentication(Message msg,
                                      java.lang.String username,
                                      java.lang.String password,
                                      java.lang.String charset,
                                      boolean proxy)
Adds an HTTP transport header for pre-emptive basic authentication for this message. Note: Pre-emptive basic authentication will perform better than basic authentication after an initial request fails with an HTTP 401 authentication required response. However, basic authentication will not be secure as digest authentication or other such mechanisms. It is reccomended that basic authentication if used, should be over an SSL secured connection - in which case the authentication security would be acceptable

Parameters:
msg - the message to add an HTTP 'Authorization' header for basic authentication
username - the username
password - the password
charset - the character set for the credentials
proxy - if header should be for proxy authentication or WWW authentication

addPreemptiveBasicAuthentication

void addPreemptiveBasicAuthentication(Message msg,
                                      java.lang.String username,
                                      java.lang.String password)
Adds an HTTP transport header for pre-emptive basic authentication for this message. Note: Pre-emptive basic authentication will perform better than basic authentication after an initial request fails with an HTTP 401 authentication required response. However, basic authentication will not be secure as digest authentication or other such mechanisms. It is reccomended that basic authentication if used, should be over an SSL secured connection - in which case the authentication security would be acceptable

Parameters:
msg - the message to add an HTTP 'Authorization' header for basic authentication
username - the username in US-ASCII character set
password - the password in US-ASCII character set

isHessian

boolean isHessian(Message msg)
Check the message content type to see if it indicates a Hessian message

Parameters:
msg - the message to detect
Returns:
true if a Hessian message is indicated

Copyright (c) 2010-2012 AdroitLogic Private Ltd. All rights reserved.