You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ng...@apache.org on 2009/08/16 22:37:01 UTC
svn commit: r804769 -
/mina/sandbox/vysper/trunk/server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/MUCModule.java
Author: ngn
Date: Sun Aug 16 20:37:01 2009
New Revision: 804769
URL: http://svn.apache.org/viewvc?rev=804769&view=rev
Log:
Add simpler constructor
Add message handler to dictionary
Modified:
mina/sandbox/vysper/trunk/server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/MUCModule.java
Modified: mina/sandbox/vysper/trunk/server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/MUCModule.java
URL: http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/MUCModule.java?rev=804769&r1=804768&r2=804769&view=diff
==============================================================================
--- mina/sandbox/vysper/trunk/server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/MUCModule.java (original)
+++ mina/sandbox/vysper/trunk/server/extensions/xep0045-muc/src/main/java/org/apache/vysper/xmpp/modules/extension/xep0045_muc/MUCModule.java Sun Aug 16 20:37:01 2009
@@ -22,7 +22,10 @@
import java.util.List;
import org.apache.vysper.xmpp.addressing.Entity;
+import org.apache.vysper.xmpp.addressing.EntityFormatException;
+import org.apache.vysper.xmpp.addressing.EntityImpl;
import org.apache.vysper.xmpp.modules.DefaultDiscoAwareModule;
+import org.apache.vysper.xmpp.modules.extension.xep0045_muc.handler.MUCMessageHandler;
import org.apache.vysper.xmpp.modules.extension.xep0045_muc.handler.MUCPresenceHandler;
import org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Conference;
import org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room;
@@ -54,14 +57,21 @@
private final Logger logger = LoggerFactory.getLogger(MUCModule.class);
public MUCModule(Entity domain) {
- this.domain = domain;
- this.conference = new Conference("Conference");
+ this(domain, new Conference("Conference"));
}
public MUCModule(Entity domain, Conference conference) {
this.domain = domain;
this.conference = conference;
}
+
+ public MUCModule(String domain) throws EntityFormatException {
+ this(EntityImpl.parse(domain));
+ }
+
+ public MUCModule(String domain, Conference conference) throws EntityFormatException {
+ this(EntityImpl.parse(domain), conference);
+ }
/**
* Initializes the MUC module, configuring the storage providers.
@@ -142,6 +152,7 @@
SubdomainHandlerDictionary dictionary = new SubdomainHandlerDictionary(domain);
dictionary.register(new MUCPresenceHandler(conference));
+ dictionary.register(new MUCMessageHandler(conference));
dictionaries.add(dictionary);
}