Commit f207284b authored by guus's avatar guus

IQHandler defines a field that contains the SessionManager instance. Classes...

IQHandler defines a field that contains the SessionManager instance. Classes that extend IQHandler should not redefine the same field and assign the exact same object to it. Instead, they should use the field from the super class.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10248 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4713e97e
...@@ -65,7 +65,6 @@ public class IQAuthHandler extends IQHandler implements IQAuthInfo { ...@@ -65,7 +65,6 @@ public class IQAuthHandler extends IQHandler implements IQAuthInfo {
private String serverName; private String serverName;
private UserManager userManager; private UserManager userManager;
private SessionManager sessionManager;
private RoutingTable routingTable; private RoutingTable routingTable;
/** /**
...@@ -294,7 +293,6 @@ public class IQAuthHandler extends IQHandler implements IQAuthInfo { ...@@ -294,7 +293,6 @@ public class IQAuthHandler extends IQHandler implements IQAuthInfo {
public void initialize(XMPPServer server) { public void initialize(XMPPServer server) {
super.initialize(server); super.initialize(server);
userManager = server.getUserManager(); userManager = server.getUserManager();
sessionManager = server.getSessionManager();
routingTable = server.getRoutingTable(); routingTable = server.getRoutingTable();
serverName = server.getServerInfo().getXMPPDomain(); serverName = server.getServerInfo().getXMPPDomain();
} }
......
...@@ -51,7 +51,6 @@ public class IQOfflineMessagesHandler extends IQHandler implements ServerFeature ...@@ -51,7 +51,6 @@ public class IQOfflineMessagesHandler extends IQHandler implements ServerFeature
private IQDiscoItemsHandler itemsHandler; private IQDiscoItemsHandler itemsHandler;
private RoutingTable routingTable; private RoutingTable routingTable;
private SessionManager sessionManager;
private UserManager userManager; private UserManager userManager;
private OfflineMessageStore messageStore; private OfflineMessageStore messageStore;
...@@ -178,7 +177,6 @@ public class IQOfflineMessagesHandler extends IQHandler implements ServerFeature ...@@ -178,7 +177,6 @@ public class IQOfflineMessagesHandler extends IQHandler implements ServerFeature
infoHandler = server.getIQDiscoInfoHandler(); infoHandler = server.getIQDiscoInfoHandler();
itemsHandler = server.getIQDiscoItemsHandler(); itemsHandler = server.getIQDiscoItemsHandler();
messageStore = server.getOfflineMessageStore(); messageStore = server.getOfflineMessageStore();
sessionManager = server.getSessionManager();
userManager = server.getUserManager(); userManager = server.getUserManager();
routingTable = server.getRoutingTable(); routingTable = server.getRoutingTable();
} }
......
...@@ -14,7 +14,6 @@ package org.jivesoftware.openfire.handler; ...@@ -14,7 +14,6 @@ package org.jivesoftware.openfire.handler;
import org.dom4j.Element; import org.dom4j.Element;
import org.jivesoftware.openfire.IQHandlerInfo; import org.jivesoftware.openfire.IQHandlerInfo;
import org.jivesoftware.openfire.SessionManager;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.auth.UnauthorizedException; import org.jivesoftware.openfire.auth.UnauthorizedException;
import org.jivesoftware.openfire.disco.ServerFeaturesProvider; import org.jivesoftware.openfire.disco.ServerFeaturesProvider;
...@@ -45,7 +44,6 @@ public class IQPrivacyHandler extends IQHandler ...@@ -45,7 +44,6 @@ public class IQPrivacyHandler extends IQHandler
private IQHandlerInfo info; private IQHandlerInfo info;
private PrivacyListManager manager = PrivacyListManager.getInstance(); private PrivacyListManager manager = PrivacyListManager.getInstance();
private PrivacyListProvider provider = new PrivacyListProvider(); private PrivacyListProvider provider = new PrivacyListProvider();
private SessionManager sessionManager;
public IQPrivacyHandler() { public IQPrivacyHandler() {
super("Blocking Communication Handler"); super("Blocking Communication Handler");
...@@ -428,6 +426,5 @@ public class IQPrivacyHandler extends IQHandler ...@@ -428,6 +426,5 @@ public class IQPrivacyHandler extends IQHandler
public void initialize(XMPPServer server) { public void initialize(XMPPServer server) {
super.initialize(server); super.initialize(server);
sessionManager = server.getSessionManager();
} }
} }
...@@ -17,7 +17,6 @@ import org.dom4j.Element; ...@@ -17,7 +17,6 @@ import org.dom4j.Element;
import org.dom4j.QName; import org.dom4j.QName;
import org.jivesoftware.openfire.IQHandlerInfo; import org.jivesoftware.openfire.IQHandlerInfo;
import org.jivesoftware.openfire.PacketException; import org.jivesoftware.openfire.PacketException;
import org.jivesoftware.openfire.SessionManager;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.auth.UnauthorizedException; import org.jivesoftware.openfire.auth.UnauthorizedException;
import org.jivesoftware.openfire.disco.ServerFeaturesProvider; import org.jivesoftware.openfire.disco.ServerFeaturesProvider;
...@@ -78,7 +77,6 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid ...@@ -78,7 +77,6 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid
private UserManager userManager; private UserManager userManager;
private RosterManager rosterManager; private RosterManager rosterManager;
private SessionManager sessionManager;
private IQHandlerInfo info; private IQHandlerInfo info;
...@@ -94,7 +92,6 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid ...@@ -94,7 +92,6 @@ public class IQRegisterHandler extends IQHandler implements ServerFeaturesProvid
super.initialize(server); super.initialize(server);
userManager = server.getUserManager(); userManager = server.getUserManager();
rosterManager = server.getRosterManager(); rosterManager = server.getRosterManager();
sessionManager = server.getSessionManager();
if (probeResult == null) { if (probeResult == null) {
// Create the basic element of the probeResult which contains the basic registration // Create the basic element of the probeResult which contains the basic registration
......
...@@ -69,7 +69,6 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider ...@@ -69,7 +69,6 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider
private UserManager userManager; private UserManager userManager;
private XMPPServer localServer; private XMPPServer localServer;
private SessionManager sessionManager;
private PacketRouter router; private PacketRouter router;
public IQRosterHandler() { public IQRosterHandler() {
...@@ -297,7 +296,6 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider ...@@ -297,7 +296,6 @@ public class IQRosterHandler extends IQHandler implements ServerFeaturesProvider
localServer = server; localServer = server;
userManager = server.getUserManager(); userManager = server.getUserManager();
router = server.getPacketRouter(); router = server.getPacketRouter();
sessionManager = server.getSessionManager();
} }
public IQHandlerInfo getInfo() { public IQHandlerInfo getInfo() {
......
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