Commit d4634b66 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Initial version. JM-388

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2769 b35dd754-fafc-0310-a699-88a17e54d16e
parent 2ecf63eb
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright (C) 2005 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.messenger.handler;
import org.jivesoftware.messenger.IQHandlerInfo;
import org.jivesoftware.messenger.auth.UnauthorizedException;
import org.xmpp.packet.IQ;
/**
* Activate client sessions once resource binding has been done. Clients need to active their
* sessions in order to engage in instant messaging and presence activities. The server may
* deny sessions activations if the max number of sessions in the server has been reached or
* if a user does not have permissions to create sessions.<p>
*
* Current implementation does not check any of the above conditions. However, future versions
* may add support for those checkings.
*
* @author Gaston Dombiak
*/
public class IQSessionEstablishmentHandler extends IQHandler {
private IQHandlerInfo info;
public IQSessionEstablishmentHandler() {
super("Session Establishment handler");
info = new IQHandlerInfo("session", "urn:ietf:params:xml:ns:xmpp-session");
}
public IQ handleIQ(IQ packet) throws UnauthorizedException {
// Just answer that the session has been activated
IQ reply = IQ.createResultIQ(packet);
reply.setChildElement(packet.getChildElement().createCopy());
return reply;
}
public IQHandlerInfo getInfo() {
return info;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment