當前位置: 首頁>>代碼示例>>Java>>正文


Java HttpSessionBindingEvent.getValue方法代碼示例

本文整理匯總了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());
	}
}
 
開發者ID:costea7,項目名稱:ChronoBike,代碼行數:14,代碼來源:OnlineSession.java

示例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());
}
 
開發者ID:MyCoRe-Org,項目名稱:mycore,代碼行數:10,代碼來源:MCRHttpSessionListener.java

示例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());
    }
}
 
開發者ID:Baeldung,項目名稱:spring-security-registration,代碼行數:10,代碼來源:LoggedUser.java

示例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());
    }
}
 
開發者ID:Baeldung,項目名稱:spring-security-registration,代碼行數:9,代碼來源:LoggedUser.java


注:本文中的javax.servlet.http.HttpSessionBindingEvent.getValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。