Commit 4ca03095 authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Refactoring changes


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@597 b35dd754-fafc-0310-a699-88a17e54d16e
parent eab6196e
...@@ -13,7 +13,7 @@ package org.jivesoftware.messenger; ...@@ -13,7 +13,7 @@ package org.jivesoftware.messenger;
import java.net.Socket; import java.net.Socket;
import java.util.Iterator; import java.util.Iterator;
import javax.xml.stream.XMLStreamException; import org.xmlpull.v1.XmlPullParserException;
/** /**
* <p>Coordinates connections (accept, read, termination) on the server.</p> * <p>Coordinates connections (accept, read, termination) on the server.</p>
...@@ -34,5 +34,5 @@ public interface ConnectionManager { ...@@ -34,5 +34,5 @@ public interface ConnectionManager {
* @param sock The socket to add to this manager for management * @param sock The socket to add to this manager for management
* @param isSecure True if this is a secure connection * @param isSecure True if this is a secure connection
*/ */
public void addSocket(Socket sock, boolean isSecure) throws XMLStreamException; public void addSocket(Socket sock, boolean isSecure) throws XmlPullParserException;
} }
...@@ -32,8 +32,6 @@ public class OfflineMessageStrategy extends BasicModule { ...@@ -32,8 +32,6 @@ public class OfflineMessageStrategy extends BasicModule {
private static Type type = Type.store; private static Type type = Type.store;
private SessionManager sessionManager; private SessionManager sessionManager;
public PacketFactory packetFactory;
public XMPPServer xmppServer; public XMPPServer xmppServer;
public PacketDeliverer deliverer; public PacketDeliverer deliverer;
public OfflineMessageStore messageStore; public OfflineMessageStore messageStore;
...@@ -146,7 +144,6 @@ public class OfflineMessageStrategy extends BasicModule { ...@@ -146,7 +144,6 @@ public class OfflineMessageStrategy extends BasicModule {
TrackInfo trackInfo = new TrackInfo(); TrackInfo trackInfo = new TrackInfo();
trackInfo.getTrackerClasses().put(PacketDeliverer.class, "deliverer"); trackInfo.getTrackerClasses().put(PacketDeliverer.class, "deliverer");
trackInfo.getTrackerClasses().put(XMPPServer.class, "xmppServer"); trackInfo.getTrackerClasses().put(XMPPServer.class, "xmppServer");
trackInfo.getTrackerClasses().put(PacketFactory.class, "packetFactory");
trackInfo.getTrackerClasses().put(OfflineMessageStore.class, "messageStore"); trackInfo.getTrackerClasses().put(OfflineMessageStore.class, "messageStore");
return trackInfo; return trackInfo;
} }
......
...@@ -832,7 +832,7 @@ public class SessionManager implements ConnectionCloseListener { ...@@ -832,7 +832,7 @@ public class SessionManager implements ConnectionCloseListener {
Presence presence = session.getPresence(); Presence presence = session.getPresence();
if (presence == null || presence.isAvailable()) { if (presence == null || presence.isAvailable()) {
Presence offline = packetFactory.getPresence(); Presence offline = new Presence();
offline.setFrom(session.getAddress()); offline.setFrom(session.getAddress());
offline.setTo(new JID(null, serverName, null)); offline.setTo(new JID(null, serverName, null));
offline.setType(Presence.Type.unavailable); offline.setType(Presence.Type.unavailable);
...@@ -903,14 +903,11 @@ public class SessionManager implements ConnectionCloseListener { ...@@ -903,14 +903,11 @@ public class SessionManager implements ConnectionCloseListener {
} }
} }
public PacketFactory packetFactory;
protected TrackInfo getTrackInfo() { protected TrackInfo getTrackInfo() {
TrackInfo trackInfo = new TrackInfo(); TrackInfo trackInfo = new TrackInfo();
trackInfo.getTrackerClasses().put(XMPPServer.class, "server"); trackInfo.getTrackerClasses().put(XMPPServer.class, "server");
trackInfo.getTrackerClasses().put(PacketRouter.class, "router"); trackInfo.getTrackerClasses().put(PacketRouter.class, "router");
trackInfo.getTrackerClasses().put(UserManager.class, "userManager"); trackInfo.getTrackerClasses().put(UserManager.class, "userManager");
trackInfo.getTrackerClasses().put(PacketFactory.class, "packetFactory");
trackInfo.getTrackerClasses().put(RoutingTable.class, "routingTable"); trackInfo.getTrackerClasses().put(RoutingTable.class, "routingTable");
return trackInfo; return trackInfo;
} }
......
...@@ -30,7 +30,6 @@ import org.jivesoftware.messenger.spi.ConnectionManagerImpl; ...@@ -30,7 +30,6 @@ import org.jivesoftware.messenger.spi.ConnectionManagerImpl;
import org.jivesoftware.messenger.spi.IQRouterImpl; import org.jivesoftware.messenger.spi.IQRouterImpl;
import org.jivesoftware.messenger.spi.MessageRouterImpl; import org.jivesoftware.messenger.spi.MessageRouterImpl;
import org.jivesoftware.messenger.spi.PacketDelivererImpl; import org.jivesoftware.messenger.spi.PacketDelivererImpl;
import org.jivesoftware.messenger.spi.PacketFactoryImpl;
import org.jivesoftware.messenger.spi.PacketRouterImpl; import org.jivesoftware.messenger.spi.PacketRouterImpl;
import org.jivesoftware.messenger.spi.PacketTransporterImpl; import org.jivesoftware.messenger.spi.PacketTransporterImpl;
import org.jivesoftware.messenger.spi.PresenceManagerImpl; import org.jivesoftware.messenger.spi.PresenceManagerImpl;
...@@ -72,7 +71,6 @@ public class XMPPBootContainer extends BootstrapContainer { ...@@ -72,7 +71,6 @@ public class XMPPBootContainer extends BootstrapContainer {
IQRouterImpl.class.getName(), IQRouterImpl.class.getName(),
MessageRouterImpl.class.getName(), MessageRouterImpl.class.getName(),
PresenceRouterImpl.class.getName(), PresenceRouterImpl.class.getName(),
PacketFactoryImpl.class.getName(),
PacketTransporterImpl.class.getName(), PacketTransporterImpl.class.getName(),
PacketDelivererImpl.class.getName(), PacketDelivererImpl.class.getName(),
......
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