org.apache.tapestry.test.mock
Class MockSession

java.lang.Object
  extended by org.apache.tapestry.test.mock.AttributeHolder
      extended by org.apache.tapestry.test.mock.MockSession
All Implemented Interfaces:
HttpSession

public class MockSession
extends AttributeHolder
implements HttpSession

Mock implementation of HttpSession.

Since:
4.0
Author:
Howard Lewis Ship

Constructor Summary
MockSession(MockContext context, String id)
           
 
Method Summary
 long getCreationTime()
           
 String getId()
           
 long getLastAccessedTime()
           
 int getMaxInactiveInterval()
           
 ServletContext getServletContext()
           
 HttpSessionContext getSessionContext()
           
 Object getValue(String name)
           
 String[] getValueNames()
           
 void invalidate()
           
 boolean isNew()
           
 void putValue(String name, Object value)
           
 void removeValue(String name)
           
 void setAttribute(String name, Object value)
           
 void setMaxInactiveInterval(int arg0)
           
 
Methods inherited from class org.apache.tapestry.test.mock.AttributeHolder
getAttribute, getAttributeNames, getAttributeNamesArray, getEnumeration, removeAttribute, simulateFailover
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.http.HttpSession
getAttribute, getAttributeNames, removeAttribute
 

Constructor Detail

MockSession

public MockSession(MockContext context,
                   String id)
Method Detail

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface HttpSession

getId

public String getId()
Specified by:
getId in interface HttpSession

getLastAccessedTime

public long getLastAccessedTime()
Specified by:
getLastAccessedTime in interface HttpSession

getServletContext

public ServletContext getServletContext()
Specified by:
getServletContext in interface HttpSession

setMaxInactiveInterval

public void setMaxInactiveInterval(int arg0)
Specified by:
setMaxInactiveInterval in interface HttpSession

getMaxInactiveInterval

public int getMaxInactiveInterval()
Specified by:
getMaxInactiveInterval in interface HttpSession

getSessionContext

public HttpSessionContext getSessionContext()
Specified by:
getSessionContext in interface HttpSession

getValue

public Object getValue(String name)
Specified by:
getValue in interface HttpSession

getValueNames

public String[] getValueNames()
Specified by:
getValueNames in interface HttpSession

putValue

public void putValue(String name,
                     Object value)
Specified by:
putValue in interface HttpSession

removeValue

public void removeValue(String name)
Specified by:
removeValue in interface HttpSession

invalidate

public void invalidate()
Specified by:
invalidate in interface HttpSession

isNew

public boolean isNew()
Specified by:
isNew in interface HttpSession

setAttribute

public void setAttribute(String name,
                         Object value)
Specified by:
setAttribute in interface HttpSession
Overrides:
setAttribute in class AttributeHolder


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.