aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPServer.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
index cb5172d6..a2f593ee 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
@@ -1,7 +1,6 @@
package com.juick.components;
import com.juick.components.s2s.*;
-import com.juick.util.ThreadHelper;
import com.juick.xmpp.JID;
import com.juick.xmpp.Stanza;
import com.juick.xmpp.StanzaChild;
@@ -10,7 +9,6 @@ import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.DisposableBean;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.core.JdbcTemplate;
import org.xmlpull.v1.XmlPullParserException;
@@ -29,7 +27,7 @@ import java.util.concurrent.ExecutorService;
/**
* @author ugnich
*/
-public class XMPPServer implements DisposableBean {
+public class XMPPServer implements AutoCloseable {
private static final Logger logger = LoggerFactory.getLogger(XMPPServer.class);
public ExecutorService service;
@@ -99,7 +97,7 @@ public class XMPPServer implements DisposableBean {
}
@Override
- public void destroy() throws Exception {
+ public void close() throws Exception {
synchronized (getOutConnections()) {
for (Iterator<ConnectionOut> i = getOutConnections().iterator(); i.hasNext(); ) {
ConnectionOut c = i.next();
@@ -115,9 +113,6 @@ public class XMPPServer implements DisposableBean {
i.remove();
}
}
-
- ThreadHelper.shutdownAndAwaitTermination(service);
-
logger.info("Xmpp server destroyed");
}