本文整理匯總了Java中javax.servlet.http.HttpSessionBindingEvent.getValue方法的典型用法代碼示例。如果您正苦於以下問題:Java HttpSessionBindingEvent.getValue方法的具體用法?Java HttpSessionBindingEvent.getValue怎麽用?Java HttpSessionBindingEvent.getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.servlet.http.HttpSessionBindingEvent
的用法示例。
在下文中一共展示了HttpSessionBindingEvent.getValue方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: valueUnbound
import javax.servlet.http.HttpSessionBindingEvent; //導入方法依賴的package包/類
public void valueUnbound(HttpSessionBindingEvent event)
{
if(event.getName().equals("AppSession"))
{
Log.logNormal("Removing session");
OnlineSession session = (OnlineSession)event.getValue();
m_ResourceManager.removeSession(session);
}
else
{
Log.logImportant("Removing unknown object from session: "+event.getName());
}
}
示例2: valueUnbound
import javax.servlet.http.HttpSessionBindingEvent; //導入方法依賴的package包/類
public void valueUnbound(HttpSessionBindingEvent hsbe) {
LOGGER.debug("Attribute {} is beeing unbound from session", hsbe.getName());
Object obj = hsbe.getValue();
if (obj instanceof MCRSession) {
MCRSession mcrSession = (MCRSession) obj;
mcrSession.close();
}
LOGGER.debug("Attribute {} is unbounded from session", hsbe.getName());
}
示例3: valueBound
import javax.servlet.http.HttpSessionBindingEvent; //導入方法依賴的package包/類
@Override
public void valueBound(HttpSessionBindingEvent event) {
System.out.println(activeUserStore);
List<String> users = activeUserStore.getUsers();
LoggedUser user = (LoggedUser) event.getValue();
if (!users.contains(user.getUsername())) {
users.add(user.getUsername());
}
}
示例4: valueUnbound
import javax.servlet.http.HttpSessionBindingEvent; //導入方法依賴的package包/類
@Override
public void valueUnbound(HttpSessionBindingEvent event) {
List<String> users = activeUserStore.getUsers();
LoggedUser user = (LoggedUser) event.getValue();
if (users.contains(user.getUsername())) {
users.remove(user.getUsername());
}
}