本文整理汇总了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());
}
}