/** * Searches for "Set-Cookie" HTTP header in the message context. If found and that given * session ID is not already in the session map update the session map by mapping the cookie * to the endpoint. * * @param synCtx MessageContext possibly containing the "Set-Cookie" HTTP header. */ public void updateSession(MessageContext synCtx) { String sessionId = extractSessionID(synCtx, SET_COOKIE); if (sessionId != null) { if (log.isDebugEnabled()) { log.debug("Found the HTTP header 'Set-Cookie: " + sessionId + "' for updating the session"); log.debug("Using the session id '" + sessionId + "' extracted from the Set-Cookie header "); } SALSessions.getInstance().updateSession(synCtx, sessionId); } }
private String extractHost(MessageContext synCtx) { Map headerMap = getTransportHeaderMap(synCtx); String hostName = null; if (headerMap != null) { Object hostObj = headerMap.get(HTTP.TARGET_HOST); hostName = (String) hostObj; if (hostName.contains(":")) { hostName = hostName.substring(0, hostName.indexOf(":")); } } return hostName; }
public void removeSessionID(MessageContext syCtx) { removeSessionID(syCtx, COOKIE); }
String hostName = extractHost(synCtx); if (log.isDebugEnabled()) { log.debug("Extracted Host Name : " + hostName); Map headerMap = getTransportHeaderMap(synCtx); String contentType = (String)headerMap.get("Content-Type"); if (log.isDebugEnabled()) { return SALSessions.getInstance().getSession(extractSessionID(synCtx, COOKIE)); } else { List<String> sessionList = extractSessionIDs(synCtx, COOKIE); if (sessionList != null) { for (String sessionID : sessionList) {
Dispatcher httpDispatcher = new HttpSessionDispatcher(); loadbalanceEndpoint.setDispatcher(httpDispatcher);
/** * Searches for "Set-Cookie" HTTP header in the message context. If found and that given * session ID is not already in the session map update the session map by mapping the cookie * to the endpoint. * * @param synCtx MessageContext possibly containing the "Set-Cookie" HTTP header. */ public void updateSession(MessageContext synCtx) { SessionCookie cookie = extractSessionCookie(synCtx, SET_COOKIE); if (cookie != null) { if (log.isDebugEnabled()) { log.debug("Found the HTTP header [Set-Cookie]: " + cookie.toString() + "' for updating the session"); } SALSessions.getInstance().updateSession(synCtx, cookie); } }
String hostName = extractHost(synCtx); if (log.isDebugEnabled()) { log.debug("Extracted Host Name : " + hostName); Map headerMap = getTransportHeaderMap(synCtx); String contentType = (String)headerMap.get("Content-Type"); if (log.isDebugEnabled()) { return SALSessions.getInstance().getSession(extractSessionID(synCtx, COOKIE)); } else { List<String> sessionList = extractSessionIDs(synCtx, COOKIE); if (sessionList != null) { for (String sessionID : sessionList) {
Dispatcher httpDispatcher = new HttpSessionDispatcher(); loadbalanceEndpoint.setDispatcher(httpDispatcher);
Dispatcher httpDispatcher = new HttpSessionDispatcher(); loadbalanceEndpoint.setDispatcher(httpDispatcher);
private String extractHost(MessageContext synCtx) { Map headerMap = getTransportHeaderMap(synCtx); String hostName = null; if (headerMap != null) { Object hostObj = headerMap.get(HTTP.TARGET_HOST); hostName = (String) hostObj; if (hostName != null && hostName.contains(":")) { hostName = hostName.substring(0, hostName.indexOf(":")); } } return hostName; }
public void unbind(MessageContext synCtx) { SALSessions.getInstance().removeSession(extractSessionID(synCtx, COOKIE)); }
public void removeSessionID(MessageContext syCtx) { removeSessionID(syCtx, COOKIE); }
Dispatcher httpDispatcher = new HttpSessionDispatcher(); loadbalanceEndpoint.setDispatcher(httpDispatcher);
protected List<String> extractSessionIDs(MessageContext synCtx, String key) { List<String> sessionList = new ArrayList<String>(); if (key != null) { Map headerMap = getTransportHeaderMap(synCtx); if (headerMap != null) { Object hostObj = headerMap.get("Host");
public void unbind(MessageContext synCtx) { SALSessions.getInstance().removeSession(extractSessionID(synCtx, COOKIE)); }
Dispatcher httpDispatcher = new HttpSessionDispatcher(); loadbalanceEndpoint.setDispatcher(httpDispatcher);
protected List<String> extractSessionIDs(MessageContext synCtx, String key) { List<String> sessionList = new ArrayList<String>(); if (key != null) { Map headerMap = getTransportHeaderMap(synCtx); if (headerMap != null) { Object hostObj = headerMap.get("Host");
Dispatcher httpDispatcher = new HttpSessionDispatcher(); loadbalanceEndpoint.setDispatcher(httpDispatcher);
setDispatcher(new HttpSessionDispatcher()); initialized = true; log.info("Tenant Aware Load Balance Endpoint is initialized.");