当前位置: 首页>>代码示例>>Java>>正文


Java ClientSession.deliverRawText方法代码示例

本文整理汇总了Java中org.jivesoftware.openfire.session.ClientSession.deliverRawText方法的典型用法代码示例。如果您正苦于以下问题:Java ClientSession.deliverRawText方法的具体用法?Java ClientSession.deliverRawText怎么用?Java ClientSession.deliverRawText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jivesoftware.openfire.session.ClientSession的用法示例。


在下文中一共展示了ClientSession.deliverRawText方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: terminateSessions

import org.jivesoftware.openfire.session.ClientSession; //导入方法依赖的package包/类
/**
 * Terminate open session for the user with specified user name. Username should be complete ie it should
 * include the % appid.
 * @param username
 */
public static void terminateSessions(String username) throws ServerNotInitializedException {
  final StreamError error = new StreamError(StreamError.Condition.not_authorized);
  for (ClientSession session : getSessionManager().getSessions(username) ) {
    LOGGER.info("Terminating session for user with name:{}", username);
    session.deliverRawText(error.toXML());
    session.close();
  }
}
 
开发者ID:magnetsystems,项目名称:message-server,代码行数:14,代码来源:UserManagerService.java

示例2: deleteUser

import org.jivesoftware.openfire.session.ClientSession; //导入方法依赖的package包/类
private static void deleteUser(User oldUser) {
    UserManager.getInstance().deleteUser(oldUser);
    final StreamError error = new StreamError(StreamError.Condition.not_authorized);
    for (ClientSession sess : SessionManager.getInstance().getSessions(oldUser.getUsername())) {
        sess.deliverRawText(error.toXML());
        sess.close();
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:9,代码来源:JustMarriedPlugin.java

示例3: disableUser

import org.jivesoftware.openfire.session.ClientSession; //导入方法依赖的package包/类
/**
 * Disable user.
 *
 * @param username
 *            the username
 * @throws ServiceException
 *             the service exception
 */
public void disableUser(String username) throws ServiceException {
    getAndCheckUser(username);
    lockOutManager.disableAccount(username, null, null);
    
    if (lockOutManager.isAccountDisabled(username)) {
        final StreamError error = new StreamError(StreamError.Condition.not_authorized);
        for (ClientSession sess : SessionManager.getInstance().getSessions(username)) {
            sess.deliverRawText(error.toXML());
            sess.close();
        }
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:21,代码来源:UserServiceController.java

示例4: removeUserSessions

import org.jivesoftware.openfire.session.ClientSession; //导入方法依赖的package包/类
/**
 * Removes the user sessions.
 *
 * @param username the username
 * @throws ServiceException the service exception
 */
public void removeUserSessions(String username) throws ServiceException {
    final StreamError error = new StreamError(StreamError.Condition.not_authorized);
    for (ClientSession session : SessionManager.getInstance().getSessions(username)) {
        session.deliverRawText(error.toXML());
        session.close();
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:14,代码来源:SessionController.java

示例5: deleteUser

import org.jivesoftware.openfire.session.ClientSession; //导入方法依赖的package包/类
/**
 * Delete user.
 *
 * @param oldUser
 *            the old user
 */
private static void deleteUser(User oldUser) {
    UserManager.getInstance().deleteUser(oldUser);
    LockOutManager.getInstance().enableAccount(oldUser.getUsername());
    final StreamError error = new StreamError(StreamError.Condition.not_authorized);
    for (ClientSession sess : SessionManager.getInstance().getSessions(oldUser.getUsername())) {
        sess.deliverRawText(error.toXML());
        sess.close();
    }
}
 
开发者ID:igniterealtime,项目名称:Openfire,代码行数:16,代码来源:JustMarriedController.java

示例6: deleteUser

import org.jivesoftware.openfire.session.ClientSession; //导入方法依赖的package包/类
private static void deleteUser(User oldUser) {
	UserManager.getInstance().deleteUser(oldUser);
	final StreamError error = new StreamError(StreamError.Condition.not_authorized);
	for (ClientSession sess : SessionManager.getInstance().getSessions(oldUser.getUsername())) {
		sess.deliverRawText(error.toXML());
		sess.close();
	}
}
 
开发者ID:idwanglu2010,项目名称:openfire,代码行数:9,代码来源:JustMarriedPlugin.java


注:本文中的org.jivesoftware.openfire.session.ClientSession.deliverRawText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。