`
ispring
  • 浏览: 359502 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Get All Connected Users

 
阅读更多

Sometimes you may be wanna get all users who connected to your server in order to manage them, such as force to kill someone's session.  When sessionRegistry.getAllPrincipals() methods will get it's play show, this method could get all the connetced users, although that implementation would prevent simultaneous logins with the same credentials.

 

Following is the example code to kill all connetced users sission:

 

Object[] principals = sessionRegistery.getAllPrincipals();
for(Object principal : principals) {
        SessionInformations[] sis = sessionRegistery.getAllSessions(principal, true);
        sis[0].expireNow();
}

 

 

分享到:
评论

相关推荐

    nodejs-chat-example

    connectedWithId=<id>" - All connected users ever with exact user by id - GET "/api/user/<id>" - User by id - POST "/api/user/" - Create user with data ({ name: "", email: "" }) - PUT "/api/user/" -...

    Professional.Git.epub

    Git works with the most popular software development tools and is used by almost all of the major technology companies. More than 40 percent of software developers use it as their primary source ...

    netterm_ssh_linux连接工具

    For example, you can have a NetTerm session connected to a host on the local area network, a site connected via the Internet, and a site connected by a direct modem connect all at the same time. All ...

    ora分析脚本

    - pxwplan <sql_id> : get explain plan with work area information of a particular cursor and all connected cursor slave SQL - eplan <sql_id> []: get explain plan with execution statistics - pxeplan ...

    Professional Git [2017]

    Connected labs and exercises are interspersed at key points to reinforce important concepts and deepen your understanding, and a focus on the practical goes beyond technical tutorials to help you ...

    SignalR – Real-time Application Development, 2nd (pdf英文原版第二版)

    Over the past few years, with services such as Facebook, Twitter and push notifications on smartphones, users are now getting used to being up to date with everything that happens all the time....

    [设计体验] 跨多终端设备 用户体验 设计手册 英文版

    Get ahead of the curve by designing for a more connected future ☆ 出版信息:☆ [作者信息] Michal Levin [出版机构] 奥莱理 [出版日期] 2014年02月28日 [图书页数] 322页 [图书语言] 英语 [图书格式]...

    FreeSWITCH.1.6.Cookbook.17852809

    The technology serves SIP, WebRTC, PSTN, FAX, PBX, VERTO, and all the relevant channels essential to stay connected in today's world. In the FreeSWITCH 1.6 Cookbook, members of the FreeSWITCH ...

    WCF & WPF 聊天程序源码

    I also found lots of chat apps based on the MSDN versions, which were no good as they could not return the list of users within the chat application. So I wanted to create a nice WPF styled app with ...

    pkg_table_to_html:允许您从数据库表创建html基本表

    C:\Users\aakin>sqlplus /nolog SQL*Plus: Release 11.2.0.2.0 Production on Sal Haz 18 08:49:39 2013 Copyright (c) 1982, 2010, Oracle. All rights reserved. SQL> con {username}/{password} Connected. SQL>...

    VB编程资源大全(英文源码 网络)

    plus all the functions are in their to relay data and store information on each users accounts. <END><br>32 , GuardDuty.zip Lets you create your very own Cyber Sitter or ...

    ramin 2.2 for xp

    Before Installation For All Users: * Uninstall any earlier version of Radmin, before installing a newer version. For Windows 2000/XP Users: * You need administrator rights to install Radmin ...

    Hello.Android.4th.Edition

    the power of local storage for occasionally connected computing and synchronization. Browser and map views can be embedded directly in More books at 1Bookcase.com report erratum • discuss your ...

    node-mongo-crud

    router.get('/users', UserController.getAll); router.get('/users/:id', UserController.getOne); router.put('/users/:id', UserController.update); router.delete('/users/:id', UserController.delete); // ...

    BURNINTEST--硬件检测工具

    Users must have administrator privileges. Windows 98 and Windows ME ========================= Windows 98 and ME are not supported in BurnInTest version 5.3 and above. Use a version of BurnInTest ...

    Nodejs操作Sqlite3数据库封装

    `node-sqlite3`提供了丰富的API,包括`run`, `get`, `all`, 和 `each`等方法,用于执行SQL语句。 1. `run(sql, [params], [callback])`:执行SQL,返回一个Promise对象,用于单条记录的插入、更新或删除操作。 2. `...

    计算机网络第六版答案

    Since the queue grows when all the users are transmitting, the fraction of time during which the queue grows (which is equal to the probability that all three users are transmitting simultaneously)...

    EhLib 9.1.024

    When DBGridEh is connected to DataSet of TMemTable type it allows: To view all data without moving active record. To display a tree-type structure of TMemTable records. To form list of values in ...

    ehlib_vcl_src_9_3.26

    When DBGridEh is connected to DataSet of TMemTable type it allows: To view all data without moving active record. To display a tree-type structure of TMemTable records. To form list of values in ...

Global site tag (gtag.js) - Google Analytics