protected void connect(String ME, Logger log, HttpSession session, String qos, HttpServletRequest req, HttpServletResponse res)
throws XmlBlasterException, IOException, ServletException {
if (qos == null || qos.length() < 1)
throw new XmlBlasterException(this.initialGlobal, ErrorCode.USER_CONFIGURATION, ME, "Missing connect QoS. Pass xmlBlaster.connectQos='<qos> ... </qos>' with your URL in your POST in a hidden form field or in your cookie.");
Global glob = this.initialGlobal.getClone(null);
ConnectQos connectQos;
boolean warnAuth = false;
if (qos.toLowerCase().indexOf("securityservice") >= 0) {
connectQos = new ConnectQos(glob, glob.getConnectQosFactory().readObject(qos)); // Applet provides authentication
}
else {
connectQos = new ConnectQos(glob); // User servlets default authentication setting
warnAuth = true;
}
ME += connectQos.getSessionName().getLoginName() + "-" + session.getId();
if (warnAuth)
log.warning("Login action, applet has not supplied connect QoS authentication information - we login with the servlets default authentication settings");
else
log.info("Login action with applet supplied connect QoS authentication information");
I_XmlBlasterAccess xmlBlasterAccess = glob.getXmlBlasterAccess();
PushHandler pushHandler = new PushHandler(req, res, session.getId(),
connectQos.getSessionName().getRelativeName(),
xmlBlasterAccess, this.timeout);
xmlBlasterAccess.connect(connectQos, pushHandler);
pushHandler.startPing();