INT-1554 polishing, further restructuring of XmppNamespaceHandler

This commit is contained in:
Oleg Zhurakousky
2010-11-04 13:32:35 -04:00
parent 601d67bcf8
commit 5f5de2fe42
2 changed files with 0 additions and 22 deletions

View File

@@ -16,14 +16,11 @@
package org.springframework.integration.xmpp.config;
import org.jivesoftware.smack.packet.Presence;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.config.xml.HeaderEnricherParserSupport;
import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
import org.springframework.integration.xmpp.XmppHeaders;
import org.springframework.util.Assert;
import org.w3c.dom.Element;
@@ -97,21 +94,4 @@ public class XmppNamespaceHandler extends NamespaceHandlerSupport {
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "auto-startup");
}
}
private static class XmppHeaderEnricherParser extends HeaderEnricherParserSupport {
public XmppHeaderEnricherParser() {
// chat headers
this.addElementToHeaderMapping("message-to", XmppHeaders.CHAT_TO_USER);
this.addElementToHeaderMapping("message-thread-id", XmppHeaders.CHAT_THREAD_ID);
// presence headers
this.addElementToHeaderMapping("presence-mode", XmppHeaders.PRESENCE_MODE, Presence.Mode.class);
this.addElementToHeaderMapping("presence-from", XmppHeaders.PRESENCE_FROM);
this.addElementToHeaderMapping("presence-status", XmppHeaders.PRESENCE_STATUS);
this.addElementToHeaderMapping("presence-priority", XmppHeaders.PRESENCE_PRIORITY, Integer.class);
}
}
}

View File

@@ -34,8 +34,6 @@ import org.springframework.util.StringUtils;
*/
public class XmppMessageSendingMessageHandler extends AbstractMessageHandler {
//private static final Log logger = LogFactory.getLog(XmppMessageSendingMessageHandler.class);
private final XMPPConnection xmppConnection;
public XmppMessageSendingMessageHandler(XMPPConnection xmppConnection){