Commit a69f4060 authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Refactoring changes


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@599 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3c4065d6
......@@ -18,12 +18,12 @@ import org.jivesoftware.messenger.user.UserNotFoundException;
import org.xmpp.packet.JID;
import org.xmpp.packet.Presence;
import org.xmpp.packet.Packet;
import org.dom4j.io.XMLWriter;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
import java.io.IOException;
import javax.xml.stream.XMLStreamWriter;
public class ServerSession implements Session {
......@@ -140,7 +140,7 @@ public class ServerSession implements Session {
return InetAddress.getLocalHost();
}
public XMLStreamWriter getSerializer() throws UnauthorizedException {
public XMLWriter getSerializer() throws UnauthorizedException {
// todo: implement so this loops back
return null;
}
......
......@@ -29,7 +29,6 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.xml.stream.XMLStreamException;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.dom4j.QName;
......@@ -37,6 +36,7 @@ import org.xmpp.packet.IQ;
import org.xmpp.packet.JID;
import org.xmpp.packet.PacketError;
import org.xmpp.packet.Presence;
import org.xmlpull.v1.XmlPullParserException;
/**
* Implements the TYPE_IQ jabber:iq:register protocol (plain only). Clients
......@@ -142,8 +142,7 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid
}
}
public synchronized IQ handleIQ(IQ packet) throws
PacketException, UnauthorizedException, XMLStreamException {
public synchronized IQ handleIQ(IQ packet) throws PacketException, UnauthorizedException, XmlPullParserException {
// Look for a delegate for this packet
IQHandler delegate = getDelegate(packet.getTo());
// We assume that the registration packet was meant to the server if delegate is
......
......@@ -22,9 +22,9 @@ import org.jivesoftware.messenger.user.Roster;
import org.jivesoftware.messenger.user.spi.IQRosterItemImpl;
import org.xmpp.packet.*;
import org.dom4j.Element;
import org.xmlpull.v1.XmlPullParserException;
import java.util.ArrayList;
import java.util.Iterator;
import javax.xml.stream.XMLStreamException;
/**
* Implements the TYPE_IQ jabber:iq:roster protocol. Clients
......@@ -111,8 +111,7 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider
*
* @param packet The packet suspected of containing a roster removal
*/
private void removeRosterItem(IQRoster packet) throws
UnauthorizedException, XMLStreamException {
private void removeRosterItem(IQRoster packet) throws UnauthorizedException, XmlPullParserException {
JID recipientJID = packet.getTo();
JID senderJID = packet.getFrom();
try {
......@@ -145,7 +144,7 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider
* @param packet The packet that triggered this update
* @return Either a response to the roster update or null if the packet is corrupt and the session was closed down
*/
private IQ manageRoster(IQRoster packet) throws UnauthorizedException, UserAlreadyExistsException, XMLStreamException {
private IQ manageRoster(IQRoster packet) throws UnauthorizedException, UserAlreadyExistsException, XmlPullParserException {
IQ returnPacket = null;
Session session = null;
......@@ -264,7 +263,6 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider
public SessionManager sessionManager;
public PresenceManager presenceManager;
public PacketRouter router;
public PacketFactory packetFactory;
public RoutingTable routingTable;
protected TrackInfo getTrackInfo() {
......@@ -275,7 +273,6 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider
trackInfo.getTrackerClasses().put(SessionManager.class, "sessionManager");
trackInfo.getTrackerClasses().put(PresenceManager.class, "presenceManager");
trackInfo.getTrackerClasses().put(PacketRouter.class, "router");
trackInfo.getTrackerClasses().put(PacketFactory.class, "packetFactory");
return trackInfo;
}
......
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