renaming components
This commit is contained in:
@@ -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) {
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user