1 16 package org.mortbay.j2ee.session; 17 18 20 import java.rmi.RemoteException ; 21 import java.util.Enumeration ; 22 import java.util.Map ; 23 24 import org.jfox.ioc.logger.Logger; 25 26 28 32 33 36 public class SynchronizingInterceptor 37 extends StateInterceptor 38 { 39 protected static final Logger _log=Logger.getLogger(SynchronizingInterceptor.class); 40 41 protected final Object _lastAccessedTimeLock=new Object (); 42 public void setLastAccessedTime(long time) throws RemoteException {synchronized(_lastAccessedTimeLock){super.setLastAccessedTime(time);}} 43 public long getLastAccessedTime() throws RemoteException {synchronized(_lastAccessedTimeLock){return super.getLastAccessedTime();}} 44 45 protected final Object _maxInactiveIntervalLock=new Object (); 46 public void setMaxInactiveInterval(int interval) throws RemoteException {synchronized(_maxInactiveIntervalLock){super.setMaxInactiveInterval(interval);}} 47 public int getMaxInactiveInterval() throws RemoteException {synchronized(_maxInactiveIntervalLock){return super.getMaxInactiveInterval();}} 48 49 protected final Object _attributesLock=new Object (); 50 public Object getAttribute(String name) throws RemoteException {synchronized(_attributesLock){return super.getAttribute(name);}} 51 public Enumeration getAttributeNameEnumeration() throws RemoteException {synchronized(_attributesLock){return super.getAttributeNameEnumeration();}} 52 public String [] getAttributeNameStringArray() throws RemoteException {synchronized(_attributesLock){return super.getAttributeNameStringArray();}} 53 public Object setAttribute(String name, Object value, boolean returnValue) throws RemoteException {synchronized(_attributesLock){return super.setAttribute(name, value, returnValue);}} 54 public Object removeAttribute(String name, boolean returnValue) throws RemoteException {synchronized(_attributesLock){return super.removeAttribute(name, returnValue);}} 55 public Map getAttributes() throws RemoteException {synchronized(_attributesLock){return super.getAttributes();}} 56 public void setAttributes(Map attributes) throws RemoteException {synchronized(_attributesLock){super.setAttributes(attributes);}} 57 58 } 60 | Popular Tags |