001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.type.scope.client; 020 021import lucee.commons.io.log.Log; 022import lucee.runtime.PageContext; 023import lucee.runtime.type.Collection; 024import lucee.runtime.type.scope.Client; 025import lucee.runtime.type.scope.storage.MemoryScope; 026import lucee.runtime.type.scope.storage.StorageScopeMemory; 027 028public class ClientMemory extends StorageScopeMemory implements Client,MemoryScope { 029 030 private static final long serialVersionUID = 5032226519712666589L; 031 032 033 /** 034 * Constructor of the class 035 * @param pc 036 * @param log 037 * @param name 038 */ 039 private ClientMemory(PageContext pc, Log log) { 040 super(pc,"client",SCOPE_CLIENT,log); 041 } 042 043 /** 044 * Constructor of the class, clone existing 045 * @param other 046 */ 047 private ClientMemory(ClientMemory other,boolean deepCopy) { 048 super(other,deepCopy); 049 } 050 /** 051 * load a new instance of the class 052 * @param pc 053 * @param log 054 * @return 055 */ 056 public static Client getInstance(PageContext pc, Log log) { 057 return new ClientMemory(pc,log); 058 } 059 060 061 @Override 062 public Collection duplicate(boolean deepCopy) { 063 return new ClientMemory(this,deepCopy); 064 } 065}