You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by be...@apache.org on 2007/12/12 23:39:00 UTC

svn commit: r603757 - in /labs/vysper: NOTICE.txt build.xml lib/smack.jar lib/smack_LICENSE.txt lib/smackx.jar src/test/java/org/apache/vysper/smack/ src/test/java/org/apache/vysper/smack/BasicClient.java

Author: berndf
Date: Wed Dec 12 14:38:59 2007
New Revision: 603757

URL: http://svn.apache.org/viewvc?rev=603757&view=rev
Log:
[vysper] adding debug & test client based on Smack library (Apache licensed)

Added:
    labs/vysper/lib/smack.jar   (with props)
    labs/vysper/lib/smack_LICENSE.txt
    labs/vysper/lib/smackx.jar   (with props)
    labs/vysper/src/test/java/org/apache/vysper/smack/
    labs/vysper/src/test/java/org/apache/vysper/smack/BasicClient.java
Modified:
    labs/vysper/NOTICE.txt
    labs/vysper/build.xml

Modified: labs/vysper/NOTICE.txt
URL: http://svn.apache.org/viewvc/labs/vysper/NOTICE.txt?rev=603757&r1=603756&r2=603757&view=diff
==============================================================================
--- labs/vysper/NOTICE.txt (original)
+++ labs/vysper/NOTICE.txt Wed Dec 12 14:38:59 2007
@@ -26,5 +26,9 @@
    under The CyberNeko Software License, Version 1.0
    NekoPull is used with kind permission of Andy Clark (andyc at a. o.). Thanks, Andy!
    
+   This product also includes software developed by
+     Jive Software (http://www.jivesoftware.com/)
+   under The Apache License
+
    Please read the LICENSE.txt and ABOUT.txt files in the root directory of 
    this distribution.

Modified: labs/vysper/build.xml
URL: http://svn.apache.org/viewvc/labs/vysper/build.xml?rev=603757&r1=603756&r2=603757&view=diff
==============================================================================
--- labs/vysper/build.xml (original)
+++ labs/vysper/build.xml Wed Dec 12 14:38:59 2007
@@ -77,6 +77,8 @@
     <pathelement location="${basedir}/lib/mina-integration-jmx-1.1.0.jar"/>
     <pathelement location="${basedir}/lib/mina-filter-ssl-1.1.0.jar"/>
     <pathelement location="${basedir}/lib/mina-integration-spring-1.1.0.jar"/>
+    <pathelement location="${basedir}/lib/smack.jar"/>
+    <pathelement location="${basedir}/lib/smackx.jar"/>
   </path>
   
   <patternset id="excluded.from.vysper">

Added: labs/vysper/lib/smack.jar
URL: http://svn.apache.org/viewvc/labs/vysper/lib/smack.jar?rev=603757&view=auto
==============================================================================
Binary file - no diff available.

Propchange: labs/vysper/lib/smack.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: labs/vysper/lib/smack_LICENSE.txt
URL: http://svn.apache.org/viewvc/labs/vysper/lib/smack_LICENSE.txt?rev=603757&view=auto
==============================================================================
--- labs/vysper/lib/smack_LICENSE.txt (added)
+++ labs/vysper/lib/smack_LICENSE.txt Wed Dec 12 14:38:59 2007
@@ -0,0 +1,21 @@
+License Agreements
+
+    * Use of thie Smack source code is governed by the Apache License:
+
+       Copyright 2002-2007 Jive Software.
+
+       All rights reserved. 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.
+       
+
+    * Smack contains icons and images licensed from INCORS GmbH. You are not licensed to use these icons outside of Smack.
+    * Third-party source code is licensed as noted in their source files
\ No newline at end of file

Added: labs/vysper/lib/smackx.jar
URL: http://svn.apache.org/viewvc/labs/vysper/lib/smackx.jar?rev=603757&view=auto
==============================================================================
Binary file - no diff available.

Propchange: labs/vysper/lib/smackx.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: labs/vysper/src/test/java/org/apache/vysper/smack/BasicClient.java
URL: http://svn.apache.org/viewvc/labs/vysper/src/test/java/org/apache/vysper/smack/BasicClient.java?rev=603757&view=auto
==============================================================================
--- labs/vysper/src/test/java/org/apache/vysper/smack/BasicClient.java (added)
+++ labs/vysper/src/test/java/org/apache/vysper/smack/BasicClient.java Wed Dec 12 14:38:59 2007
@@ -0,0 +1,55 @@
+/***********************************************************************
+ * Copyright (c) 2006-2007 The Apache Software Foundation.             *
+ * All rights reserved.                                                *
+ * ------------------------------------------------------------------- *
+ * 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.                      *
+ ***********************************************************************/
+package org.apache.vysper.smack;
+
+import org.jivesoftware.smack.ConnectionConfiguration;
+import org.jivesoftware.smack.SASLAuthentication;
+import org.jivesoftware.smack.XMPPConnection;
+import org.jivesoftware.smack.XMPPException;
+
+/**
+ */
+public class BasicClient {
+    public static void main(String[] args) throws XMPPException {
+
+        try {
+            ConnectionConfiguration connectionConfiguration = new ConnectionConfiguration("localhost");
+            connectionConfiguration.setCompressionEnabled(false);
+            connectionConfiguration.setSelfSignedCertificateEnabled(true);
+            connectionConfiguration.setExpiredCertificatesCheckEnabled(false);
+            connectionConfiguration.setDebuggerEnabled(true);
+            connectionConfiguration.setSASLAuthenticationEnabled(true);
+            connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
+            XMPPConnection.DEBUG_ENABLED = true;
+            XMPPConnection connection = new XMPPConnection(connectionConfiguration);
+            connection.connect();
+
+            SASLAuthentication saslAuthentication = connection.getSASLAuthentication();
+            saslAuthentication.authenticateAnonymously();
+
+            connection.login("vysperuser", "mypass");
+            // Chat chat = connection.getChatManager().createChat("vysper@apache.org", new MessageListener() {
+            //    public void processMessage(Chat chat, Message message) { 
+            //        System.out.println("log received message: " + message); } 
+            //     }); 
+            //chat.sendMessage("Hello Vysper!"); 
+            connection.disconnect(); 
+        } catch (Throwable e) {
+            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+        }
+    }
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org