You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ng...@apache.org on 2011/03/23 08:28:40 UTC

svn commit: r1084488 [2/2] - in /mina/vysper/trunk/server/extensions: ./ xep0065-socks/ xep0065-socks/src/ xep0065-socks/src/examples/ xep0065-socks/src/examples/client/ xep0065-socks/src/examples/java/ xep0065-socks/src/examples/java/org/ xep0065-sock...

Added: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5IqHandlerTest.java
URL: http://svn.apache.org/viewvc/mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5IqHandlerTest.java?rev=1084488&view=auto
==============================================================================
--- mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5IqHandlerTest.java (added)
+++ mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5IqHandlerTest.java Wed Mar 23 07:28:39 2011
@@ -0,0 +1,169 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ *
+ */
+package org.apache.vysper.xmpp.extension.xep0065_socks;
+
+import java.net.InetSocketAddress;
+
+import junit.framework.Assert;
+
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.vysper.xml.fragment.XMLSemanticError;
+import org.apache.vysper.xmpp.addressing.Entity;
+import org.apache.vysper.xmpp.addressing.EntityImpl;
+import org.apache.vysper.xmpp.protocol.NamespaceURIs;
+import org.apache.vysper.xmpp.server.ServerRuntimeContext;
+import org.apache.vysper.xmpp.server.SessionContext;
+import org.apache.vysper.xmpp.stanza.IQStanza;
+import org.apache.vysper.xmpp.stanza.IQStanzaType;
+import org.apache.vysper.xmpp.stanza.Stanza;
+import org.apache.vysper.xmpp.stanza.StanzaBuilder;
+import org.apache.vysper.xmpp.state.resourcebinding.BindException;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+/**
+ */
+public class Socks5IqHandlerTest extends Mockito {
+
+    private static final Entity FROM = EntityImpl.parseUnchecked("requestor@vysper.org");
+    private static final Entity TARGET = EntityImpl.parseUnchecked("target@vysper.org");
+    private static final Entity TO = EntityImpl.parseUnchecked("socks.vysper.org");
+    
+    private ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
+    private SessionContext sessionContext = Mockito.mock(SessionContext.class);
+    private IQStanza stanza = (IQStanza) IQStanza.getWrapper(buildStanza());
+    
+    private Socks5ConnectionsRegistry connectionsRegistry = mock(Socks5ConnectionsRegistry.class);
+    
+    private Entity jid = EntityImpl.parseUnchecked("socks.vysper.org");
+    private InetSocketAddress proxyAddress = new InetSocketAddress("1.2.3.4", 12345);
+
+    private Socks5IqHandler handler = new Socks5IqHandler(jid, proxyAddress, connectionsRegistry);
+    
+    private Stanza buildStanza() {
+        return buildStanza("iq", NamespaceURIs.JABBER_CLIENT, "query", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS);
+    }
+
+    private Stanza buildStanza(String name, String namespaceUri) {
+        return buildStanza(name, namespaceUri, "query", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS);
+    }
+    
+    private Stanza buildStanza(String name, String namespaceUri, String innerName, String innerNamespaceUri) {
+        return new StanzaBuilder(name, namespaceUri)
+            .addAttribute("type", "get")
+            .addAttribute("id", "1")
+            .startInnerElement(innerName, innerNamespaceUri)
+            .build();
+    }
+    
+    @Test
+    public void nameMustBeIq() {
+        Assert.assertEquals("iq", handler.getName());
+    }
+
+    @Test
+    public void verifyNullStanza() {
+        Assert.assertFalse(handler.verify(null));
+    }
+
+    @Test
+    public void verifyInvalidName() {
+        Assert.assertFalse(handler.verify(buildStanza("dummy", NamespaceURIs.JABBER_CLIENT)));
+    }
+
+    @Test
+    public void verifyInvalidNamespace() {
+        Assert.assertFalse(handler.verify(buildStanza("iq", "dummy")));
+    }
+
+    @Test
+    public void verifyNullNamespace() {
+        Assert.assertFalse(handler.verify(buildStanza("iq", null)));
+    }
+
+    @Test
+    public void verifyNullInnerNamespace() {
+        Assert.assertFalse(handler.verify(buildStanza("iq", NamespaceURIs.JABBER_CLIENT, "query", null)));
+    }
+
+    @Test
+    public void verifyInvalidInnerNamespace() {
+        Assert.assertFalse(handler.verify(buildStanza("iq", NamespaceURIs.JABBER_CLIENT, "query", "dummy")));
+    }
+    
+    @Test
+    public void verifyInvalidInnerName() {
+        Assert.assertFalse(handler.verify(buildStanza("iq", NamespaceURIs.JABBER_CLIENT, "dummy", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)));
+    }
+
+    @Test
+    public void verifyMissingInnerElement() {
+        Stanza stanza = new StanzaBuilder("iq", NamespaceURIs.JABBER_CLIENT).build();
+        Assert.assertFalse(handler.verify(stanza));
+    }
+    
+    @Test
+    public void verifyValidStanza() {
+        Assert.assertTrue(handler.verify(stanza));
+    }
+
+    @Test
+    public void sessionIsRequired() {
+        Assert.assertTrue(handler.isSessionRequired());
+    }
+
+    @Test
+    public void handleGet() throws BindException, XMLSemanticError {
+        Stanza response = handler.handleGet(stanza, serverRuntimeContext, sessionContext);
+        
+        Stanza expected = StanzaBuilder.createIQStanza(stanza.getTo(), stanza.getFrom(), IQStanzaType.RESULT, stanza.getID())
+            .startInnerElement("query", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)
+            .startInnerElement("streamhost", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)
+            .addAttribute("host", proxyAddress.getHostName())
+            .addAttribute("jid", jid.getFullQualifiedName())
+            .addAttribute("port", Integer.toString(proxyAddress.getPort()))
+            .build();
+
+        StanzaAssert.assertEquals(expected, response);
+    }
+
+    @Test
+    public void handleSetActivate() throws BindException, XMLSemanticError {
+        IQStanza request = (IQStanza) IQStanza.getWrapper(StanzaBuilder.createIQStanza(FROM, TO, IQStanzaType.SET, "id1")
+            .startInnerElement("query", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)
+            .addAttribute("sid", "sid1")
+            .startInnerElement("activate", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)
+            .addText(TARGET.getFullQualifiedName())
+            .build());
+
+        String hash = DigestUtils.shaHex("sid1" + FROM.getFullQualifiedName() + TARGET.getFullQualifiedName());
+        when(connectionsRegistry.activate(hash)).thenReturn(true);
+        
+        Stanza response = handler.handleSet(request, serverRuntimeContext, sessionContext);
+        
+        Stanza expected = StanzaBuilder.createIQStanza(TO, FROM, IQStanzaType.RESULT, "id1")
+            .build();
+
+        StanzaAssert.assertEquals(expected, response);
+        
+        verify(connectionsRegistry).activate(hash);
+    }
+
+}

Added: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5ModuleTest.java
URL: http://svn.apache.org/viewvc/mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5ModuleTest.java?rev=1084488&view=auto
==============================================================================
--- mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5ModuleTest.java (added)
+++ mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5ModuleTest.java Wed Mar 23 07:28:39 2011
@@ -0,0 +1,202 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ *
+ */
+package org.apache.vysper.xmpp.extension.xep0065_socks;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.vysper.xmpp.addressing.Entity;
+import org.apache.vysper.xmpp.addressing.EntityImpl;
+import org.apache.vysper.xmpp.modules.servicediscovery.collection.ServiceCollector;
+import org.apache.vysper.xmpp.modules.servicediscovery.collection.ServiceDiscoveryRequestListenerRegistry;
+import org.apache.vysper.xmpp.modules.servicediscovery.management.Feature;
+import org.apache.vysper.xmpp.modules.servicediscovery.management.Identity;
+import org.apache.vysper.xmpp.modules.servicediscovery.management.InfoElement;
+import org.apache.vysper.xmpp.modules.servicediscovery.management.InfoRequest;
+import org.apache.vysper.xmpp.modules.servicediscovery.management.Item;
+import org.apache.vysper.xmpp.protocol.NamespaceURIs;
+import org.apache.vysper.xmpp.server.ServerRuntimeContext;
+import org.apache.vysper.xmpp.server.components.ComponentStanzaProcessor;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+/**
+ *
+ * @author The Apache MINA Project (dev@mina.apache.org)
+ */
+public class Socks5ModuleTest extends Mockito {
+
+    private static final Entity SERVER = EntityImpl.parseUnchecked("vysper.org");
+    private static final Entity COMPONENT = EntityImpl.parseUnchecked("socks.vysper.org");
+    private static final Entity FROM = EntityImpl.parseUnchecked("user@vysper.org");
+    
+    private Socks5Module module = new Socks5Module("socks");
+    
+    private ServerRuntimeContext serverRuntimeContext = mock(ServerRuntimeContext.class);
+    private Socks5ConnectionsRegistry connectionsRegistry = mock(Socks5ConnectionsRegistry.class);
+    
+    @Before
+    public void before() {
+        when(serverRuntimeContext.getServerEnitity()).thenReturn(SERVER);
+        
+        module.setConnectionsRegistry(connectionsRegistry);
+    }
+    
+    @Test
+    public void getName() {
+        Assert.assertNotNull(module.getName());
+    }
+
+    @Test
+    public void getVersion() {
+        Assert.assertNotNull(module.getVersion());
+    }
+    
+    @Test
+    public void getSubdomain() {
+        Assert.assertEquals("socks", module.getSubdomain());
+    }
+    
+    @Test(expected=IllegalArgumentException.class)
+    public void nullSubdomain() {
+        new Socks5Module(null);
+    }
+    
+    @Test(expected=IllegalArgumentException.class)
+    public void emptySubdomain() {
+        new Socks5Module("");
+    }
+    
+    @Test(expected=IllegalArgumentException.class)
+    public void fullDomain() {
+        new Socks5Module("socks.vysper.org");
+    }
+
+    @Test
+    public void getStanzaProcessor() throws Exception {
+        module = new Socks5Module("socks");
+        module.initialize(serverRuntimeContext);
+        Assert.assertTrue(module.getStanzaProcessor() instanceof ComponentStanzaProcessor);
+    }
+    
+    @Test
+    public void discoItems() throws Exception {
+        ServiceCollector collector = new ServiceCollector();
+        
+        when(serverRuntimeContext.getServerRuntimeContextService(ServiceDiscoveryRequestListenerRegistry.SERVICE_DISCOVERY_REQUEST_LISTENER_REGISTRY))
+        .thenReturn(collector);
+        
+        module = new Socks5Module("socks");
+        
+        module.initialize(serverRuntimeContext);
+        
+        InfoRequest infoRequest = new InfoRequest(FROM, SERVER, null, "id1");
+        List<Item> items = collector.processItemRequest(infoRequest);
+        
+        List<Item> expected = Arrays.asList(new Item(COMPONENT)); 
+        Assert.assertEquals(expected, items);
+    }
+    
+    @Test
+    public void discoComponentInfo() throws Exception {
+        ServiceCollector collector = new ServiceCollector();
+        
+        when(serverRuntimeContext.getServerRuntimeContextService(ServiceDiscoveryRequestListenerRegistry.SERVICE_DISCOVERY_REQUEST_LISTENER_REGISTRY))
+        .thenReturn(collector);
+        
+        module = new Socks5Module("socks");
+        
+        module.initialize(serverRuntimeContext);
+        
+        InfoRequest infoRequest = new InfoRequest(FROM, COMPONENT, null, "id1");
+        List<InfoElement> infoElements = collector.processComponentInfoRequest(infoRequest);
+        
+        
+        List<InfoElement> expected = Arrays.asList(new Identity("proxy", "bytestreams", "File Transfer Relay"), 
+              new Feature(NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)); 
+        Assert.assertEquals(expected, infoElements);
+    }
+    
+    @Test
+    public void proxy() throws Exception {
+        int port = findFreePort();
+        
+        InetSocketAddress address = new InetSocketAddress(port);
+        
+        module = new Socks5Module("socks", address);
+        module.initialize(serverRuntimeContext);
+        
+        Thread.sleep(200);
+        
+        assertSocket(port);
+    }
+    
+    @Test
+    public void proxyDefaultAddress() throws Exception {
+        module = new Socks5Module("socks");
+        module.initialize(serverRuntimeContext);
+        
+        Thread.sleep(200);
+        
+        assertSocket(5777);
+    }
+
+    @Test(expected=RuntimeException.class)
+    public void proxyAddressInUse() throws Exception {
+        ServerSocket ss = new ServerSocket(5777);
+        
+        module = new Socks5Module("socks");
+        module.initialize(serverRuntimeContext);
+        
+        module.close();
+        ss.close();
+    }
+
+    
+    private int findFreePort() throws IOException, SocketException {
+        ServerSocket ss = new ServerSocket(0);
+        ss.setReuseAddress(true);
+        int port = ss.getLocalPort();
+        ss.close();
+        return port;
+    }
+
+    private void assertSocket(int port) throws UnknownHostException, IOException {
+        Socket socket = new Socket("127.0.0.1", port);
+        socket.close();
+    }
+    
+    @After
+    public void after() {
+        if(module != null) {
+            module.close();
+        }
+    }
+
+}

Added: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5PairTest.java
URL: http://svn.apache.org/viewvc/mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5PairTest.java?rev=1084488&view=auto
==============================================================================
--- mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5PairTest.java (added)
+++ mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/Socks5PairTest.java Wed Mar 23 07:28:39 2011
@@ -0,0 +1,89 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ *
+ */
+package org.apache.vysper.xmpp.extension.xep0065_socks;
+
+import org.apache.mina.core.session.IoSession;
+import org.junit.Assert;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+/**
+ *
+ * @author The Apache MINA Project (dev@mina.apache.org)
+ */
+public class Socks5PairTest extends Mockito {
+
+    private String hash = "foo";
+    private IoSession target = mock(IoSession.class);
+    private IoSession requester = mock(IoSession.class);
+    
+    private Socks5ConnectionsRegistry connectionsRegistry = mock(Socks5ConnectionsRegistry.class);
+    
+    @Test
+    public void constructor() {
+        Socks5Pair pair = new Socks5Pair(target, connectionsRegistry, hash);
+
+        Assert.assertEquals(target, pair.getTarget());
+        Assert.assertNull(pair.getRequester());
+        Assert.assertFalse(pair.isActivated());
+    }
+
+    @Test
+    public void requester() {
+        Socks5Pair pair = new Socks5Pair(target, connectionsRegistry, hash);
+        pair.setRequester(requester);
+        
+        Assert.assertEquals(requester, pair.getRequester());
+        Assert.assertFalse(pair.isActivated());
+    }
+    
+    @Test
+    public void getOther() {
+        Socks5Pair pair = new Socks5Pair(target, connectionsRegistry, hash);
+        pair.setRequester(requester);
+        
+        Assert.assertEquals(requester, pair.getOther(target));
+        Assert.assertEquals(target, pair.getOther(requester));
+    }
+    
+    @Test
+    public void activation() {
+        Socks5Pair pair = new Socks5Pair(target, connectionsRegistry, hash);
+        pair.setRequester(requester);
+        
+        Assert.assertFalse(pair.isActivated());
+        
+        pair.activate();
+        
+        Assert.assertTrue(pair.isActivated());
+    }
+    
+    @Test
+    public void close() {
+        Socks5Pair pair = new Socks5Pair(target, connectionsRegistry, hash);
+        pair.setRequester(requester);
+        
+        pair.close();
+
+        verify(target).close(false);
+        verify(requester).close(false);
+    }
+
+}

Added: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/StanzaAssert.java
URL: http://svn.apache.org/viewvc/mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/StanzaAssert.java?rev=1084488&view=auto
==============================================================================
--- mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/StanzaAssert.java (added)
+++ mina/vysper/trunk/server/extensions/xep0065-socks/src/test/java/org/apache/vysper/xmpp/extension/xep0065_socks/StanzaAssert.java Wed Mar 23 07:28:39 2011
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you 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.
+ *
+ */
+
+package org.apache.vysper.xmpp.extension.xep0065_socks;
+
+import org.apache.vysper.xml.fragment.Renderer;
+import org.apache.vysper.xmpp.stanza.Stanza;
+import org.junit.Assert;
+
+public class StanzaAssert {
+
+    public static void assertEquals(Stanza expected, Stanza actual) {
+        try {
+            Assert.assertEquals(expected, actual);
+        } catch(Throwable e) {
+            // print something useful
+            Assert.assertEquals(new Renderer(expected).getComplete(), new Renderer(actual).getComplete());
+        }
+    }
+}

Added: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/bogus_mina_tls.cert
URL: http://svn.apache.org/viewvc/mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/bogus_mina_tls.cert?rev=1084488&view=auto
==============================================================================
Binary file - no diff available.

Propchange: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/bogus_mina_tls.cert
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/log4j.properties?rev=1084488&view=auto
==============================================================================
--- mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/log4j.properties (added)
+++ mina/vysper/trunk/server/extensions/xep0065-socks/src/test/resources/log4j.properties Wed Mar 23 07:28:39 2011
@@ -0,0 +1,28 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+log4j.rootLogger=info, C
+
+log4j.logger.org.apache.vysper.mina.XmppIoHandlerAdapter=WARN,C
+log4j.logger.org.apache.mina.filter.executor.ExecutorFilter=WARN,C
+log4j.logger.org.apache.http=DEBUG
+
+
+log4j.appender.C=org.apache.log4j.ConsoleAppender 
+log4j.appender.C.layout=org.apache.log4j.PatternLayout 
+log4j.appender.C.layout.ConversionPattern=%m%n
+