|
Fish & Chips Club 4.7.1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objecthirondelle.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 HttpSessionpublic String getId()
getId in interface HttpSessionpublic long getLastAccessedTime()
getLastAccessedTime in interface HttpSessionpublic ServletContext getServletContext()
getServletContext in interface HttpSessionpublic void setMaxInactiveInterval(int aInterval)
setMaxInactiveInterval in interface HttpSessionpublic int getMaxInactiveInterval()
getMaxInactiveInterval in interface HttpSessionpublic Enumeration getAttributeNames()
getAttributeNames in interface HttpSessionpublic Object getAttribute(String aName)
getAttribute in interface HttpSession
public void setAttribute(String aName,
Object aObject)
setAttribute in interface HttpSessionpublic void removeAttribute(String aName)
removeAttribute in interface HttpSessionpublic void invalidate()
invalidate in interface HttpSessionpublic boolean isNew()
isNew in interface HttpSession
public void putValue(String aName,
Object aValue)
putValue in interface HttpSessionpublic void removeValue(String aName)
removeValue in interface HttpSessionpublic Object getValue(String aName)
getValue in interface HttpSessionpublic HttpSessionContext getSessionContext()
getSessionContext in interface HttpSessionpublic String[] getValueNames()
getValueNames in interface HttpSession
|
Fish & Chips Club 4.7.1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||