aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick/components/XMPPServer.java')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/XMPPServer.java15
1 files changed, 4 insertions, 11 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 72dba642..ffb7e260 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
@@ -2,7 +2,6 @@ package com.juick.components;
import com.juick.components.s2s.*;
import com.juick.service.*;
-import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.slf4j.Logger;
@@ -38,9 +37,8 @@ public class XMPPServer implements AutoCloseable {
private static final Logger logger = LoggerFactory.getLogger(XMPPServer.class);
public ExecutorService service;
- private ConnectionRouter router;
- public String HOSTNAME, componentName;
+ public String HOSTNAME;
public String keystore;
public String keystorePassword;
public List<String> brokenSSLhosts;
@@ -51,6 +49,9 @@ public class XMPPServer implements AutoCloseable {
private final List<CacheEntry> outCache = Collections.synchronizedList(new ArrayList<>());
private final List<StanzaListener> stanzaListeners = Collections.synchronizedList(new ArrayList<>());
+
+ @Inject
+ private ConnectionRouter router;
@Inject
public MessagesService messagesService;
@Inject
@@ -78,20 +79,12 @@ public class XMPPServer implements AutoCloseable {
try {
HOSTNAME = env.getProperty("hostname");
session = BasicXmppSession.create(HOSTNAME, configuration);
- componentName = env.getProperty("componentname");
- int componentPort = NumberUtils.toInt(env.getProperty("component_port"), 5347);
int s2sPort = NumberUtils.toInt(env.getProperty("s2s_port"), 5269);
keystore = env.getProperty("keystore");
keystorePassword = env.getProperty("keystore_password");
brokenSSLhosts = Arrays.asList(env.getProperty("broken_ssl_hosts", StringUtils.EMPTY).split(","));
bannedHosts = Arrays.asList(env.getProperty("banned_hosts", StringUtils.EMPTY).split(","));
jid = Jid.of(env.getProperty("xmppbot_jid"));
- boolean disabled = BooleanUtils.toBoolean(env.getProperty("xmpp_disabled", "false"));
-
- if (!disabled) {
- router = new ConnectionRouter(this, componentName, componentPort, env.getProperty("xmpp_password"));
- service.submit(router);
- }
service.submit(() -> {
try {