`
ispring
  • 浏览: 355956 次
  • 性别: 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 ...

    Drupal 6 Panels Cookbook

    This book comes to your rescue and discusses all that you need to successfully incorporate Panels in your Drupal CMS. You will learn everything from setting up Panels, through using it, to integrating...

    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 ...

    Android Cookbook, 2nd Edition 2017年出版766页

    Mobile devices are, for the most part, always-on and always-connected. This has a major impact on how people use them and think about them. Chapter 12 shows the coding for traditional networked ...

    PHP and MySQL Web Devepopment 4th Edition.pdf

    The /E switch is similar to the /A switch, except that instead of telling DCDIAG to test all of the domain controllers in the current site, it tells DCDIAG to test every domain controller in the ...

    Windows 8 App Projects - XAML and C# Edition

    They provide a way to inform your users of certain events and provide a way to draw users back into your application. In this chapter we’ll take a look at how to create and update tiles and badges. ...

    计算机网络第六版答案

    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