Add DummyMessenger class
This commit is contained in:
parent
ec35ab8ec9
commit
67f6347268
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* Some Javadoc information about the package.
|
||||
*/
|
||||
package org.olomono.messenger;
|
Loading…
Reference in New Issue