polishing

This commit is contained in:
Mark Fisher
2010-11-15 15:54:27 -05:00
parent 6a7cfee022
commit 6c93d80ac3
3 changed files with 9 additions and 9 deletions

View File

@@ -19,7 +19,6 @@ package org.springframework.integration.xmpp.inbound;
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.springframework.integration.MessageChannel;

View File

@@ -49,7 +49,7 @@ public class PresenceListeningEndpoint extends AbstractXmppConnectionAwareEndpoi
private final MessagingTemplate messagingTemplate = new MessagingTemplate();
private final EventForwardingRosterListener rosterListener = new EventForwardingRosterListener();
private final PresencePublishingRosterListener rosterListener = new PresencePublishingRosterListener();
public PresenceListeningEndpoint() {
@@ -91,10 +91,10 @@ public class PresenceListeningEndpoint extends AbstractXmppConnectionAwareEndpoi
/**
* RosterListener that subscribes to a given {@link Roster}'s events.
* Presence changes will be forwarded to a message channel.
* All others are only logged at debug level.
* Presence changes will be published to a message channel.
* All other roster events are only logged at debug level.
*/
private class EventForwardingRosterListener implements RosterListener {
private class PresencePublishingRosterListener implements RosterListener {
public void entriesAdded(Collection<String> entries) {
if (logger.isDebugEnabled()) {

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.assertEquals;
@@ -28,19 +29,19 @@ import org.springframework.integration.xmpp.inbound.ChatMessageListeningEndpoint
/**
* @author Oleg Zhurakousky
*
*/
public class InboundXmppEndpointParserTests {
@Test
public void testInboundAdapter(){
ApplicationContext context =
new ClassPathXmlApplicationContext("InboundXmppEndpointParserTests-context.xml", this.getClass());
ApplicationContext context = new ClassPathXmlApplicationContext(
"InboundXmppEndpointParserTests-context.xml", this.getClass());
ChatMessageListeningEndpoint xmde = context.getBean("xmppInboundAdapter", ChatMessageListeningEndpoint.class);
assertFalse(xmde.isAutoStartup());
DirectChannel channel = (DirectChannel) TestUtils.getPropertyValue(xmde, "requestChannel");
DirectChannel channel = (DirectChannel) TestUtils.getPropertyValue(xmde, "messagingTemplate.defaultChannel");
assertEquals("xmppInbound", channel.getComponentName());
XMPPConnection connection = (XMPPConnection)TestUtils.getPropertyValue(xmde, "xmppConnection");
assertEquals(connection, context.getBean("testConnection"));
}
}