Commit 35ca2208 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Refactoring wortk. JM-924

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6540 b35dd754-fafc-0310-a699-88a17e54d16e
parent 0479d1ae
......@@ -3,7 +3,7 @@
* $Revision: 3168 $
* $Date: 2005-12-07 13:55:47 -0300 (Wed, 07 Dec 2005) $
*
* Copyright (C) 2004 Jive Software. All rights reserved.
* Copyright (C) 2007 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.
......@@ -15,11 +15,11 @@ import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
import org.jivesoftware.util.ElementUtil;
import org.jivesoftware.wildfire.ClientSession;
import org.jivesoftware.wildfire.PacketRouter;
import org.jivesoftware.wildfire.Session;
import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.muc.*;
import org.jivesoftware.wildfire.session.ClientSession;
import org.jivesoftware.wildfire.session.Session;
import org.xmpp.packet.JID;
import org.xmpp.packet.Packet;
import org.xmpp.packet.Presence;
......
......@@ -3,7 +3,7 @@
* $Revision: $
* $Date: $
*
* Copyright (C) 2006 Jive Software. All rights reserved.
* Copyright (C) 2007 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.
......@@ -14,16 +14,18 @@ package org.jivesoftware.wildfire.multiplex;
import org.dom4j.Element;
import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.net.VirtualConnection;
import org.jivesoftware.wildfire.session.ConnectionMultiplexerSession;
import org.xmpp.packet.IQ;
import org.xmpp.packet.Packet;
import java.net.InetAddress;
import java.net.UnknownHostException;
/**
* Represents a connection of a Client Session that was established to a Connection Manager.
* Connection Managers have their own physical connections to the server that are multiplexed
* among connected clients. Each created {@link org.jivesoftware.wildfire.ClientSession} will
* use an instance of this class as its connection.
* among connected clients. Each created {@link org.jivesoftware.wildfire.session.ClientSession}
* will use an instance of this class as its connection.
*
* @author Gaston Dombiak
*/
......@@ -62,7 +64,7 @@ public class ClientSessionConnection extends VirtualConnection {
wrapper.setTo(connectionManagerName);
wrapper.setChildElement(packet.getElement().createCopy());
// Deliver wrapper
multiplexerSession.deliver(wrapper);
multiplexerSession.process(wrapper);
session.incrementServerPacketCount();
}
}
......@@ -94,7 +96,7 @@ public class ClientSessionConnection extends VirtualConnection {
}
}
public InetAddress getInetAddress() {
public InetAddress getInetAddress() throws UnknownHostException {
//TODO Future version may return actual IP client address. We would need to pass this info
// Return IP address of the connection manager that the client used to log in
ConnectionMultiplexerSession multiplexerSession =
......@@ -137,7 +139,7 @@ public class ClientSessionConnection extends VirtualConnection {
"http://jabber.org/protocol/connectionmanager");
child.addAttribute("id", streamID);
child.addElement("close");
multiplexerSession.deliver(closeRequest);
multiplexerSession.process(closeRequest);
}
}
}
......
......@@ -3,7 +3,7 @@
* $Revision: $
* $Date: $
*
* Copyright (C) 2006 Jive Software. All rights reserved.
* Copyright (C) 2007 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.
......@@ -11,14 +11,20 @@
package org.jivesoftware.wildfire.multiplex;
import org.jivesoftware.util.JiveConstants;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.TaskEngine;
import org.jivesoftware.util.JiveConstants;
import org.jivesoftware.wildfire.*;
import org.jivesoftware.wildfire.Connection;
import org.jivesoftware.wildfire.SessionManager;
import org.jivesoftware.wildfire.StreamID;
import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.auth.UnauthorizedException;
import org.jivesoftware.wildfire.event.SessionEventDispatcher;
import org.jivesoftware.wildfire.event.SessionEventListener;
import org.jivesoftware.wildfire.session.ClientSession;
import org.jivesoftware.wildfire.session.ConnectionMultiplexerSession;
import org.jivesoftware.wildfire.session.Session;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
......
......@@ -3,7 +3,7 @@
* $Revision: $
* $Date: $
*
* Copyright (C) 2006 Jive Software. All rights reserved.
* Copyright (C) 2007 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.
......@@ -19,6 +19,7 @@ import org.jivesoftware.wildfire.PacketDeliverer;
import org.jivesoftware.wildfire.PacketException;
import org.jivesoftware.wildfire.XMPPServer;
import org.jivesoftware.wildfire.auth.UnauthorizedException;
import org.jivesoftware.wildfire.session.ConnectionMultiplexerSession;
import org.xmpp.packet.IQ;
import org.xmpp.packet.Message;
import org.xmpp.packet.Packet;
......@@ -48,7 +49,7 @@ public class MultiplexerPacketDeliverer implements PacketDeliverer {
multiplexerManager = ConnectionMultiplexerManager.getInstance();
}
void setConnectionManagerDomain(String connectionManagerDomain) {
public void setConnectionManagerDomain(String connectionManagerDomain) {
this.connectionManagerDomain = connectionManagerDomain;
}
......@@ -68,7 +69,7 @@ public class MultiplexerPacketDeliverer implements PacketDeliverer {
}
else {
// Send the packet using this other session to the same connection manager
session.deliver(packet);
session.process(packet);
}
}
}
......
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