Example usage for com.liferay.portal.kernel.poller.comet CometSession setSessionId

List of usage examples for com.liferay.portal.kernel.poller.comet CometSession setSessionId

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.poller.comet CometSession setSessionId.

Prototype

public void setSessionId(String sessionId);

Source Link

Usage

From source file:com.liferay.support.tomcat.poller.comet.CatalinaCometProcessor.java

License:Open Source License

protected void startCometHandler(CometEvent cometEvent, HttpServletRequest request, HttpSession session)
        throws Exception {

    CometSession cometSession = new CatalinaCometSession(cometEvent);

    cometSession.setCometRequest(new CatalinaCometRequest(cometEvent));
    cometSession.setCometResponse(new CatalinaCometResponse(cometEvent));

    String sessionId = CatalinaCometSessionUtil.getSessionId(cometEvent);

    cometSession.setSessionId(sessionId);

    CometHandler cometHandler = _cometHandler.clone();

    CometHandlerPoolUtil.startCometHandler(cometSession, cometHandler);

    HttpServletResponse response = cometEvent.getHttpServletResponse();

    response.setContentType(ContentTypes.TEXT_PLAIN_UTF8);
}