|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object hirondelle.fish.test.doubles.FakeSession
public class FakeSession
Fake implementation of HttpSession
, used
only for testing outside of the regular runtime environment.
Method Summary | |
---|---|
Object |
getAttribute(String aName)
|
Enumeration |
getAttributeNames()
|
long |
getCreationTime()
Returns the time this session object was created. |
String |
getId()
Return the session id. |
long |
getLastAccessedTime()
|
int |
getMaxInactiveInterval()
Default value 30 minutes. |
ServletContext |
getServletContext()
Returns a fake ServletContext. |
HttpSessionContext |
getSessionContext()
Returns null - deprecated. |
Object |
getValue(String aName)
Returns null - deprecated. |
String[] |
getValueNames()
Returns null - deprecated. |
void |
invalidate()
|
boolean |
isNew()
Returns true only if no request has yet joined this session. |
static HttpSession |
joinOrCreate(String aRequestedSessionId,
boolean aCreateNew)
Each incoming request calls this method in order to join an existing session, or create a new one. |
void |
putValue(String aName,
Object aValue)
Does nothing - deprecated. |
void |
removeAttribute(String aName)
|
void |
removeValue(String aName)
Does nothing - deprecated. |
void |
setAttribute(String aName,
Object aObject)
|
void |
setMaxInactiveInterval(int aInterval)
|
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static HttpSession joinOrCreate(String aRequestedSessionId, boolean aCreateNew)
aRequestedSessionId
- identifies the session that the request wishes to join.aCreateNew
- if the request fails to join an existing session and aCreateNew is true, then
a new session is created. If aCreateNew is false, then no such new session is created.
public long getCreationTime()
getCreationTime
in interface HttpSession
public String getId()
getId
in interface HttpSession
public long getLastAccessedTime()
getLastAccessedTime
in interface HttpSession
public ServletContext getServletContext()
getServletContext
in interface HttpSession
public void setMaxInactiveInterval(int aInterval)
setMaxInactiveInterval
in interface HttpSession
public int getMaxInactiveInterval()
getMaxInactiveInterval
in interface HttpSession
public Enumeration getAttributeNames()
getAttributeNames
in interface HttpSession
public Object getAttribute(String aName)
getAttribute
in interface HttpSession
public void setAttribute(String aName, Object aObject)
setAttribute
in interface HttpSession
public void removeAttribute(String aName)
removeAttribute
in interface HttpSession
public void invalidate()
invalidate
in interface HttpSession
public boolean isNew()
isNew
in interface HttpSession
public void putValue(String aName, Object aValue)
putValue
in interface HttpSession
public void removeValue(String aName)
removeValue
in interface HttpSession
public Object getValue(String aName)
getValue
in interface HttpSession
public HttpSessionContext getSessionContext()
getSessionContext
in interface HttpSession
public String[] getValueNames()
getValueNames
in interface HttpSession
|
Fish & Chips Club 4.10.0.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |