renaming components

This commit is contained in:
Mark Fisher
2010-11-13 11:55:00 -05:00
parent 22821d42d3
commit c0d9a9a02c
5 changed files with 13 additions and 11 deletions

View File

@@ -23,12 +23,12 @@ import org.springframework.integration.config.xml.AbstractOutboundChannelAdapter
import org.w3c.dom.Element;
/**
* Parser for 'xmpp:roster-event-outbound-channel-adapter' element
* Parser for 'xmpp:presence-outbound-channel-adapter' element
*
* @author Oleg Zhurakousky
* @since 2.0
*/
public class XmppRosterEventOutboundEndpointParser extends AbstractOutboundChannelAdapterParser {
public class PresenceOutboundChannelAdapterParser extends AbstractOutboundChannelAdapterParser {
@Override
protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) {

View File

@@ -38,7 +38,7 @@ public class XmppNamespaceHandler extends NamespaceHandlerSupport {
// presence
registerBeanDefinitionParser("roster-event-inbound-channel-adapter", new XmppRosterListeningEndpointParser());
registerBeanDefinitionParser("roster-event-outbound-channel-adapter", new XmppRosterEventOutboundEndpointParser());
registerBeanDefinitionParser("presence-outbound-channel-adapter", new PresenceOutboundChannelAdapterParser());
registerBeanDefinitionParser("header-enricher", new XmppHeaderEnricherParser());
}

View File

@@ -46,7 +46,7 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="roster-event-outbound-channel-adapter">
<xsd:element name="presence-outbound-channel-adapter">
<xsd:annotation>
<xsd:documentation>
Configures an endpoint that will publish an updated {@link org.jivesoftware.smack.packet.Presence} state on your {@link XMPPConnection } object.

View File

@@ -15,20 +15,20 @@
<int:queue/>
</int:channel>
<int-xmpp:roster-event-outbound-channel-adapter id="pollingOutboundRosterAdapter"
<int-xmpp:presence-outbound-channel-adapter id="pollingOutboundRosterAdapter"
xmpp-connection="testConnection"
channel="pollingChannel">
<int:poller fixed-rate="1000" max-messages-per-poll="1"/>
</int-xmpp:roster-event-outbound-channel-adapter>
</int-xmpp:presence-outbound-channel-adapter>
<int:channel id="eventChannel"/>
<int-xmpp:roster-event-outbound-channel-adapter id="eventOutboundRosterAdapter"
<int-xmpp:presence-outbound-channel-adapter id="eventOutboundRosterAdapter"
xmpp-connection="testConnection"
channel="eventChannel"/>
<int-xmpp:roster-event-outbound-channel-adapter id="eventOutboundRosterChannel"
<int-xmpp:presence-outbound-channel-adapter id="eventOutboundRosterChannel"
xmpp-connection="testConnection"/>

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.xmpp.config;
import static junit.framework.Assert.assertTrue;
@@ -33,7 +34,7 @@ public class XmppRosterEventOutboundChannelAdapterParserTests {
@Test
public void testRosterEventOutboundChannelAdapterParserAsPollingConsumer(){
ApplicationContext ac =
new ClassPathXmlApplicationContext("XmppRosterEventOutboundChannelAdapterParserTests-context.xml", this.getClass());
new ClassPathXmlApplicationContext("XmppRosterEventOutboundChannelAdapterParserTests-context.xml", this.getClass());
Object pollingConsumer = ac.getBean("pollingOutboundRosterAdapter");
assertTrue(pollingConsumer instanceof PollingConsumer);
}
@@ -41,7 +42,7 @@ public class XmppRosterEventOutboundChannelAdapterParserTests {
@Test
public void testRosterEventOutboundChannelAdapterParserEventConsumer(){
ApplicationContext ac =
new ClassPathXmlApplicationContext("XmppRosterEventOutboundChannelAdapterParserTests-context.xml", this.getClass());
new ClassPathXmlApplicationContext("XmppRosterEventOutboundChannelAdapterParserTests-context.xml", this.getClass());
Object eventConsumer = ac.getBean("eventOutboundRosterAdapter");
assertTrue(eventConsumer instanceof EventDrivenConsumer);
}
@@ -49,8 +50,9 @@ public class XmppRosterEventOutboundChannelAdapterParserTests {
@Test
public void testRosterEventOutboundChannel(){
ApplicationContext ac =
new ClassPathXmlApplicationContext("XmppRosterEventOutboundChannelAdapterParserTests-context.xml", this.getClass());
new ClassPathXmlApplicationContext("XmppRosterEventOutboundChannelAdapterParserTests-context.xml", this.getClass());
Object channel = ac.getBean("eventOutboundRosterChannel");
assertTrue(channel instanceof SubscribableChannel);
}
}