public class TempFileHolder extends Object implements javax.servlet.http.HttpSessionBindingListener
remove.| Modifier and Type | Method and Description |
|---|---|
static void |
attach(javax.servlet.http.HttpSession session,
String attributeName,
FileInfo fileInfo)
Create a holding the given
FileInfo, and
attach it to the session with the given attribute name. |
static FileInfo |
remove(javax.servlet.http.HttpSession session,
String attributeName)
Get the which is stored as an attribute on this
session, extract the
FileInfo from it, and remove it from the
session. |
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent event)
When attached to the session, do nothing.
|
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
When removed from the session, if the
fileInfo is not empty,
delete the file. |
public static void attach(javax.servlet.http.HttpSession session,
String attributeName,
FileInfo fileInfo)
FileInfo, and
attach it to the session with the given attribute name.
If an attribute with this name already exists, it is replaced.public static FileInfo remove(javax.servlet.http.HttpSession session, String attributeName)
FileInfo from it, and remove it from the
session.
If there is no such attribute, of if it is not a ,
return null.public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerpublic void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
fileInfo is not empty,
delete the file. If you had wanted this file, you should have called
remove.valueUnbound in interface javax.servlet.http.HttpSessionBindingListenerCopyright © 2016. All rights reserved.