001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.poller.comet;
016    
017    /**
018     * @author Edward Han
019     */
020    public class CometHandlerPoolUtil {
021    
022            public static void closeCometHandler(String sessionId)
023                    throws CometException {
024    
025                    _cometHandlerPool.closeCometHandler(sessionId);
026            }
027    
028            public static void closeCometHandlers() throws CometException {
029                    _cometHandlerPool.closeCometHandlers();
030            }
031    
032            public static CometHandler getCometHandler(String sessionId) {
033                    return _cometHandlerPool.getCometHandler(sessionId);
034            }
035    
036            public static void startCometHandler(
037                            CometSession cometSession, CometHandler cometHandler)
038                    throws CometException {
039    
040                    _cometHandlerPool.startCometHandler(cometSession, cometHandler);
041            }
042    
043            public CometHandlerPool getCometHandlerPool() {
044                    return _cometHandlerPool;
045            }
046    
047            public void setCometHandlerPool(CometHandlerPool cometHandlerPool) {
048                    _cometHandlerPool = cometHandlerPool;
049            }
050    
051            private static CometHandlerPool _cometHandlerPool;
052    
053    }