Add DummyMessenger class

This commit is contained in:
Paul Schaub 2019-03-28 01:46:01 +01:00
parent ec35ab8ec9
commit 67f6347268
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package org.olomono.messenger;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import java.io.IOException;
/**
* This is a dummy messenger app class.
*/
public class DummyMessenger {
private XMPPConnection connection;
/**
* Create a new {@link DummyMessenger}.
*
* @param username username of the user (jid)
* @param password password of the users account
* @throws IOException
* @throws InterruptedException
* @throws XMPPException
* @throws SmackException
*/
public DummyMessenger(String username, String password)
throws IOException, InterruptedException, XMPPException, SmackException {
XMPPTCPConnection con = new XMPPTCPConnection(username, password);
connection = con.connect();
con.login();
}
}

View File

@ -0,0 +1,4 @@
/**
* Some Javadoc information about the package.
*/
package org.olomono.messenger;