Commit 091842b3 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

. Added update manager. JM-715

. Refactoring work

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3994 b35dd754-fafc-0310-a699-88a17e54d16e
parent a1edc2c5
...@@ -38,6 +38,7 @@ import org.jivesoftware.wildfire.pubsub.PubSubModule; ...@@ -38,6 +38,7 @@ import org.jivesoftware.wildfire.pubsub.PubSubModule;
import org.jivesoftware.wildfire.roster.RosterManager; import org.jivesoftware.wildfire.roster.RosterManager;
import org.jivesoftware.wildfire.spi.*; import org.jivesoftware.wildfire.spi.*;
import org.jivesoftware.wildfire.transport.TransportHandler; import org.jivesoftware.wildfire.transport.TransportHandler;
import org.jivesoftware.wildfire.update.UpdateManager;
import org.jivesoftware.wildfire.user.UserManager; import org.jivesoftware.wildfire.user.UserManager;
import org.jivesoftware.wildfire.vcard.VCardManager; import org.jivesoftware.wildfire.vcard.VCardManager;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
...@@ -411,7 +412,7 @@ public class XMPPServer { ...@@ -411,7 +412,7 @@ public class XMPPServer {
// Load core modules // Load core modules
loadModule(PresenceManagerImpl.class.getName()); loadModule(PresenceManagerImpl.class.getName());
loadModule(SessionManager.class.getName()); loadModule(SessionManager.class.getName());
loadModule(PacketRouter.class.getName()); loadModule(PacketRouterImpl.class.getName());
loadModule(IQRouter.class.getName()); loadModule(IQRouter.class.getName());
loadModule(MessageRouter.class.getName()); loadModule(MessageRouter.class.getName());
loadModule(PresenceRouter.class.getName()); loadModule(PresenceRouter.class.getName());
...@@ -445,6 +446,7 @@ public class XMPPServer { ...@@ -445,6 +446,7 @@ public class XMPPServer {
loadModule(IQPrivacyHandler.class.getName()); loadModule(IQPrivacyHandler.class.getName());
loadModule(FileTransferProxy.class.getName()); loadModule(FileTransferProxy.class.getName());
loadModule(PubSubModule.class.getName()); loadModule(PubSubModule.class.getName());
loadModule(UpdateManager.class.getName());
// Load this module always last since we don't want to start listening for clients // Load this module always last since we don't want to start listening for clients
// before the rest of the modules have been started // before the rest of the modules have been started
loadModule(ConnectionManagerImpl.class.getName()); loadModule(ConnectionManagerImpl.class.getName());
...@@ -805,7 +807,7 @@ public class XMPPServer { ...@@ -805,7 +807,7 @@ public class XMPPServer {
} }
// Stop the Db connection manager. // Stop the Db connection manager.
DbConnectionManager.getConnectionProvider().destroy(); DbConnectionManager.getConnectionProvider().destroy();
// TODO: hack to allow safe stopping // hack to allow safe stopping
Log.info("Wildfire stopped"); Log.info("Wildfire stopped");
} }
...@@ -894,7 +896,7 @@ public class XMPPServer { ...@@ -894,7 +896,7 @@ public class XMPPServer {
* @return the <code>PacketRouter</code> registered with this server. * @return the <code>PacketRouter</code> registered with this server.
*/ */
public PacketRouter getPacketRouter() { public PacketRouter getPacketRouter() {
return (PacketRouter) modules.get(PacketRouter.class); return (PacketRouter) modules.get(PacketRouterImpl.class);
} }
/** /**
...@@ -1042,6 +1044,17 @@ public class XMPPServer { ...@@ -1042,6 +1044,17 @@ public class XMPPServer {
return UserManager.getInstance(); return UserManager.getInstance();
} }
/**
* Returns the <code>UpdateManager</code> registered with this server. The
* <code>UpdateManager</code> was registered with the server as a module while starting up
* the server.
*
* @return the <code>UpdateManager</code> registered with this server.
*/
public UpdateManager getUpdateManager() {
return (UpdateManager) modules.get(UpdateManager.class);
}
/** /**
* Returns the <code>AuditManager</code> registered with this server. The * Returns the <code>AuditManager</code> registered with this server. The
* <code>AuditManager</code> was registered with the server as a module while starting up * <code>AuditManager</code> was registered with the server as a module while starting up
......
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