Commit 75a9411e authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Refactoring to remove trackinfo logic.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@625 b35dd754-fafc-0310-a699-88a17e54d16e
parent 82b0d989
...@@ -56,26 +56,7 @@ public class WebManager extends WebBean { ...@@ -56,26 +56,7 @@ public class WebManager extends WebBean {
* Returns <tt>true</tt> if the Messenger container is in setup mode, <tt>false</tt> otherwise. * Returns <tt>true</tt> if the Messenger container is in setup mode, <tt>false</tt> otherwise.
*/ */
public boolean isSetupMode() { public boolean isSetupMode() {
return getContainer().isSetupMode(); return getXMPPServer().isSetupMode();
}
/**
* Returns an instnace of the ServiceLookup.
*/
public ServiceLookup getServiceLookup() {
try {
return ServiceLookupFactory.getLookup();
}
catch (UnauthorizedException ex) {
return null;
}
}
/**
* Returns the server's container.
*/
public Container getContainer() {
return (Container)getServiceLookup().lookup(Container.class);
} }
/** /**
...@@ -92,7 +73,7 @@ public class WebManager extends WebBean { ...@@ -92,7 +73,7 @@ public class WebManager extends WebBean {
} }
public UserManager getUserManager() { public UserManager getUserManager() {
return (UserManager)getServiceLookup().lookup(UserManager.class); return getXMPPServer().getUserManager();
} }
public GroupManager getGroupManager() { public GroupManager getGroupManager() {
...@@ -100,23 +81,23 @@ public class WebManager extends WebBean { ...@@ -100,23 +81,23 @@ public class WebManager extends WebBean {
} }
public RosterManager getRosterManager() { public RosterManager getRosterManager() {
return (RosterManager)getServiceLookup().lookup(RosterManager.class); return getXMPPServer().getRosterManager();
} }
public PrivateStorage getPrivateStore() { public PrivateStorage getPrivateStore() {
return (PrivateStorage)getServiceLookup().lookup(PrivateStorage.class); return getXMPPServer().getPrivateStorage();
} }
public PresenceManager getPresenceManager() { public PresenceManager getPresenceManager() {
return (PresenceManager)getServiceLookup().lookup(PresenceManager.class); return getXMPPServer().getPresenceManager();
} }
public SessionManager getSessionManager() { public SessionManager getSessionManager() {
return SessionManager.getInstance(); return getXMPPServer().getSessionManager();
} }
public MultiUserChatServer getMultiUserChatServer() { public MultiUserChatServer getMultiUserChatServer() {
return (MultiUserChatServer)getServiceLookup().lookup(MultiUserChatServer.class); return getXMPPServer().getMultiUserChatServer;
} }
public XMPPServerInfo getServerInfo() { public XMPPServerInfo getServerInfo() {
...@@ -151,7 +132,7 @@ public class WebManager extends WebBean { ...@@ -151,7 +132,7 @@ public class WebManager extends WebBean {
/** /**
* Restarts the container then sleeps for 3 seconds. * Restarts the container then sleeps for 3 seconds.
*/ */
public void restart(Container container) { /*public void restart(Container container) {
try { try {
container.restart(); container.restart();
} }
...@@ -159,14 +140,14 @@ public class WebManager extends WebBean { ...@@ -159,14 +140,14 @@ public class WebManager extends WebBean {
Log.error(e); Log.error(e);
} }
sleep(); sleep();
} }*/
/** /**
* Stops the container then sleeps for 3 seconds. * Stops the server then sleeps for 3 seconds.
*/ */
public void stop(Container container) { public void stop(XMPPServer server) {
try { try {
container.stop(); server.stop();
} }
catch (Exception e) { catch (Exception e) {
Log.error(e); Log.error(e);
......
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