INT-1580 code cleanup
This commit is contained in:
@@ -33,7 +33,7 @@ public class XmppConnectionParser extends AbstractSingleBeanDefinitionParser {
|
||||
|
||||
@Override
|
||||
protected String getBeanClassName(Element element) {
|
||||
return "org.springframework.integration.xmpp" + ".XmppConnectionFactoryBean";
|
||||
return "org.springframework.integration.xmpp.XmppConnectionFactoryBean";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,40 +54,6 @@ public class XmppNamespaceHandler extends NamespaceHandlerSupport {
|
||||
|
||||
registerBeanDefinitionParser("header-enricher", new XmppHeaderEnricherParser());
|
||||
}
|
||||
|
||||
|
||||
// private static void configureXMPPConnection(Element element, BeanDefinitionBuilder builder, ParserContext parserContext) {
|
||||
// String ref = element.getAttribute("xmpp-connection");
|
||||
// if (StringUtils.hasText(ref)) {
|
||||
// builder.addPropertyReference("xmppConnection", ref);
|
||||
// } else {
|
||||
// for (String attribute : attributes) {
|
||||
// IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, attribute);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// connection management
|
||||
|
||||
// private static class XmppConnectionParser extends AbstractSingleBeanDefinitionParser {
|
||||
//
|
||||
// @Override
|
||||
// protected String getBeanClassName(Element element) {
|
||||
// return PACKAGE_NAME + ".XmppConnectionFactory";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected boolean shouldGenerateIdAsFallback() {
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
// configureXMPPConnection(element, builder, parserContext);
|
||||
// }
|
||||
// }
|
||||
|
||||
// messages
|
||||
|
||||
private static class XmppMessageOutboundEndpointParser extends AbstractOutboundChannelAdapterParser {
|
||||
@@ -96,7 +62,9 @@ public class XmppNamespaceHandler extends NamespaceHandlerSupport {
|
||||
protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) {
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(
|
||||
PACKAGE_NAME + ".messages.XmppMessageSendingMessageHandler");
|
||||
//configureXMPPConnection(element, builder, parserContext);
|
||||
String connectionName = element.getAttribute("xmpp-connection");
|
||||
Assert.hasText(connectionName, "'xmpp-connection' must be defined");
|
||||
builder.addPropertyReference("xmppConnection", connectionName);
|
||||
return builder.getBeanDefinition();
|
||||
}
|
||||
}
|
||||
@@ -130,7 +98,9 @@ public class XmppNamespaceHandler extends NamespaceHandlerSupport {
|
||||
protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) {
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(
|
||||
PACKAGE_NAME + ".presence.XmppRosterEventMessageSendingHandler");
|
||||
//configureXMPPConnection(element, builder, parserContext);
|
||||
String connectionName = element.getAttribute("xmpp-connection");
|
||||
Assert.hasText(connectionName, "'xmpp-connection' must be defined");
|
||||
builder.addPropertyReference("xmppConnection", connectionName);
|
||||
return builder.getBeanDefinition();
|
||||
}
|
||||
}
|
||||
@@ -149,7 +119,9 @@ public class XmppNamespaceHandler extends NamespaceHandlerSupport {
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
|
||||
//configureXMPPConnection(element, builder, parserContext);
|
||||
String connectionName = element.getAttribute("xmpp-connection");
|
||||
Assert.hasText(connectionName, "'xmpp-connection' must be defined");
|
||||
builder.addPropertyReference("xmppConnection", connectionName);
|
||||
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "channel", "requestChannel");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "extract-payload");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "auto-startup");
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2010 the original author or authors ~ ~ Licensed under the
|
||||
Apache License, Version 2.0 (the "License"); ~ you may not use this
|
||||
file except in compliance with the License. ~ You may obtain a copy of
|
||||
the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~
|
||||
Unless required by applicable law or agreed to in writing, software ~
|
||||
distributed under the License is distributed on an "AS IS" BASIS, ~
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied. ~ See the License for the specific language governing
|
||||
permissions and ~ limitations under the License.
|
||||
-->
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
|
||||
@@ -37,8 +26,6 @@
|
||||
host="${user.2.host}"
|
||||
port="${user.2.port}"
|
||||
resource="${user.2.resource}"
|
||||
sasl-mechanism-supported="${user.2.sasl.mechanism}"
|
||||
sasl-mechanism-supported-index="${user.2.sasl.index}"
|
||||
service-name="${user.2.service}"
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,16 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright 2010 the original author or authors ~ ~ Licensed under the
|
||||
Apache License, Version 2.0 (the "License"); ~ you may not use this
|
||||
file except in compliance with the License. ~ You may obtain a copy of
|
||||
the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~
|
||||
Unless required by applicable law or agreed to in writing, software ~
|
||||
distributed under the License is distributed on an "AS IS" BASIS, ~
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied. ~ See the License for the specific language governing
|
||||
permissions and ~ limitations under the License.
|
||||
-->
|
||||
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
|
||||
@@ -41,8 +29,6 @@
|
||||
host="${user.2.host}"
|
||||
port="${user.2.port}"
|
||||
resource="${user.2.resource}"
|
||||
sasl-mechanism-supported="${user.2.sasl.mechanism}"
|
||||
sasl-mechanism-supported-index="0"
|
||||
service-name="${user.2.service}"
|
||||
/>
|
||||
|
||||
|
||||
@@ -14,14 +14,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
# to be able to run these tests, put this file on your desktop and configure as appropriate
|
||||
user.1.login=user1@gmail.com
|
||||
user.1.password=password
|
||||
user.1.host=talk.google.com
|
||||
user.1.service=gmail.com
|
||||
user.1.sasl.mechanism=PLAIN
|
||||
user.1.sasl.index=0
|
||||
user.1.resource=resource
|
||||
user.1.port=5222
|
||||
user.2.login=springintegration.eip@gmail.com
|
||||
user.2.password=spr1ng1p
|
||||
user.2.host=talk.google.com
|
||||
|
||||
Reference in New Issue
Block a user