Package org.beangle.security.core.session

Examples of org.beangle.security.core.session.SessionException


    String principal = auth.getName();
    // 是否为重复注册
    if (null != existed && ObjectUtils.equals(existed.getUsername(), principal)) return;
    // 争取名额
    boolean success = controller.onRegister(auth, sessionId, this);
    if (!success) throw new SessionException("security.OvermaxSession");
    // 注销同会话的其它账户
    if (null != existed) {
      remove(sessionId, " expired with replacement.");
    }
    // 新生
View Full Code Here


    String principal = auth.getName();
    // 是否为重复注册
    if (null != existed && ObjectUtils.equals(existed.getUsername(), principal)) return;
    // 争取名额
    boolean success = controller.onRegister(auth, sessionid, this);
    if (!success) throw new SessionException("security.OvermaxSession");
    // 注销同会话的其它账户
    if (null != existed) {
      existed.addRemark(" expired with replacement.");
      remove(sessionid);
    }
View Full Code Here

    String principal = auth.getName();
    // 是否为重复注册
    if (null != existed && ObjectUtils.equals(existed.getUsername(), principal)) return;
    // 争取名额
    boolean success = controller.onRegister(auth, sessionid, this);
    if (!success) throw new SessionException("security.OvermaxSession");
    // 注销同会话的其它账户
    if (null != existed) {
      existed.addRemark(" expired with replacement.");
      remove(sessionid);
    }
View Full Code Here

    String principal = auth.getName();
    // 是否为重复注册
    if (null != existed && ObjectUtils.equals(existed.getUsername(), principal)) return;
    // 争取名额
    boolean success = controller.onRegister(auth, sessionId, this);
    if (!success) throw new SessionException("security.OvermaxSession");
    // 注销同会话的其它账户
    if (null != existed) {
      remove(sessionId, " expired with replacement.");
    }
    // 新生
View Full Code Here

   * @param registry
   * @see checkAuthenticationAllowed
   */
  protected void allowableSessionsExceeded(String sessionId, List<SessionInfo> sessions,
      int allowableSessions, SessionRegistry registry) throws SessionException {
    if (exceptionIfMaximumExceeded || (sessions == null)) { throw new SessionException(
        "over max online sessions "); }
    // Determine least recently used session, and mark it for invalidation
    SessionInfo leastRecentlyUsed = null;
    for (int i = 0; i < sessions.size(); i++) {
      if ((leastRecentlyUsed == null)
View Full Code Here

  public void register(String sessionId, Authentication auth) {
    CategoryPrincipal principal = (CategoryPrincipal) auth.getPrincipal();
    SessionInfo existed = innerRegistry.getSessionInfo(sessionId);
    // 原先没有的要占座
    if (null == existed && !sessionController.reserve(principal.getCategory(), sessionId)) {
      throw new SessionException("over max " + sessionController.getMax());
    } else {
      innerRegistry.register(sessionId, auth);
    }
  }
View Full Code Here

TOP

Related Classes of org.beangle.security.core.session.SessionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.