1 16 package org.apache.cocoon.acting; 17 18 import org.apache.avalon.framework.parameters.Parameters; 19 import org.apache.avalon.framework.thread.ThreadSafe; 20 import org.apache.cocoon.environment.ObjectModelHelper; 21 import org.apache.cocoon.environment.Redirector; 22 import org.apache.cocoon.environment.Request; 23 import org.apache.cocoon.environment.Session; 24 import org.apache.cocoon.environment.SourceResolver; 25 26 import java.util.Map ; 27 28 35 public class SessionInvalidatorAction extends AbstractAction implements ThreadSafe 36 { 37 40 public Map act (Redirector redirector, SourceResolver resolver, Map objectModel, String src, 41 Parameters parameters) throws Exception { 42 Request req = ObjectModelHelper.getRequest(objectModel); 43 44 45 Session session = req.getSession (false); 46 if (session != null) { 47 session.invalidate (); 48 if (this.getLogger().isDebugEnabled()) { 49 getLogger ().debug ("SESSIONINVALIDATOR: session invalidated"); 50 } 51 } else { 52 if (this.getLogger().isDebugEnabled()) { 53 getLogger ().debug ("SESSIONINVALIDATOR: no session object"); 54 } 55 } 56 57 return EMPTY_MAP; } 59 } 60 | Popular Tags |