aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-30 13:37:19 +0300
committerGravatar Vitaly Takmazov2016-11-30 13:37:19 +0300
commitf5fd9c7bea380eb4c0c2d58f2167ad3f07c45c33 (patch)
tree2b82b9cdfdb896de4b449dfea8d36a8b6ecce9c3 /juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
parentd42a45842b97f6e7313bbfbb352fc12509df4839 (diff)
juick-xmpp: fix injection
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.java14
1 files changed, 13 insertions, 1 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 a26389ea..b5065c74 100644
--- a/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
+++ b/juick-xmpp/src/main/java/com/juick/components/XMPPServer.java
@@ -1,6 +1,7 @@
package com.juick.components;
import com.juick.components.s2s.*;
+import com.juick.service.*;
import com.juick.xmpp.JID;
import com.juick.xmpp.Stanza;
import com.juick.xmpp.StanzaChild;
@@ -12,6 +13,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.core.env.Environment;
import org.xmlpull.v1.XmlPullParserException;
+import javax.inject.Inject;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
@@ -45,6 +47,17 @@ public class XMPPServer implements AutoCloseable {
final public HashMap<String, StanzaChild> childParsers = new HashMap<>();
+ @Inject
+ public MessagesService messagesService;
+ @Inject
+ public UserService userService;
+ @Inject
+ public TagService tagService;
+ @Inject
+ public PMQueriesService pmQueriesService;
+ @Inject
+ public SubscriptionService subscriptionService;
+
public XMPPServer(Environment env, ExecutorService service) {
this.service = service;
@@ -67,7 +80,6 @@ public class XMPPServer implements AutoCloseable {
if (!disabled) {
router = new ConnectionRouter(this, componentName, componentPort, env.getProperty("xmpp_password"));
-
service.submit(router);
service.submit(() -> {