|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
There are many cases in web applications where you need to store a bunch of things between requests, but do not want the hassle of having to remember all the bits and peices you may have loaded into the session along the way.
A Pipe fits nicely between the request and the session. You can use a Pipe just like a session, in that you can set, get and remove named attributes, and at the end of the Pipe you just close it and it's gone.
| Nested Class Summary | |
static class |
Pipe.Factory
Use this Factory class to create or retrieve a named Pipe for the session. |
| Method Summary | |
void |
close()
close this Pipe and remove it from the session. |
Object |
getAttribute(String name)
Get the named attribute from the Pipe. |
Iterator |
getAttributeNames()
Get an Iterator of all of the attrbiute names in the pipe. |
void |
removeAttribute(String name)
remove a named attribute from the Pipe. |
void |
setAttribute(String name,
Object value)
Set a named attribute in the Pipe. |
void |
setName(String name)
Set the name of the Pipe. |
void |
setSession(HttpSession session)
Set the session containing the Pipe. |
| Method Detail |
public void setName(String name)
name - The name of the Pipe.public void setSession(HttpSession session)
session - The session that contains the Pipe.public Object getAttribute(String name)
name - The name of the attribute to get.
public Iterator getAttributeNames()
public void setAttribute(String name,
Object value)
name - The attribute name.value - The attribute value.public void removeAttribute(String name)
name - The name of the attribute to remove.public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||