• 大小: 9.72MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-09
  • 语言: 其他
  • 标签: smack  

资源简介

smack(4.1.6)+openfire(4.0.2)的运用实践的测试用例

资源截图

代码片段和文件信息

package com;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.InputMethodEvent;
import java.awt.event.InputMethodListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import javax.swing.JButton;
import javax.swing.Jframe;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.event.AncestorEvent;
import javax.swing.event.AncestorListener;

import org.apache.commons.logging.Log;
import org.jivesoftware.smack.AbstractXMPPConnection;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode;
import org.jivesoftware.smack.PacketCollector;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.chat.Chat;
import org.jivesoftware.smack.chat.ChatManager;
import org.jivesoftware.smack.chat.ChatManagerListener;
import org.jivesoftware.smack.chat.ChatMessageListener;
import org.jivesoftware.smack.filter.AndFilter;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.PacketIDFilter;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
import org.jivesoftware.smackx.delay.packet.DelayInformation;
import org.jivesoftware.smackx.iqregister.AccountManager;
import org.jivesoftware.smackx.iqregister.packet.Registration;
import org.jivesoftware.smackx.muc.DiscussionHistory;
import org.jivesoftware.smackx.muc.HostedRoom;
import org.jivesoftware.smackx.muc.MultiUserChat;
import org.jivesoftware.smackx.muc.MultiUserChatManager;
import org.jivesoftware.smackx.muc.RoomInfo;
import org.jivesoftware.smackx.muc.packet.MUCInitialPresence.History;
import org.jivesoftware.smackx.xdata.Form;
import org.jivesoftware.smackx.xdata.FormField;

public class Test extends Jframe{

/**
 * 
 */
private static final long serialVersionUID = 1L;

private static AbstractXMPPConnection conn;

private static ChatManager chatManager;

private String username=“未登录“;
private String password=“admin“;

// private static String username=“test01“;

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-03-21 12:12  smack-test\
     文件        5923  2016-03-26 16:43  smack-test\.classpath
     文件         386  2016-03-21 12:12  smack-test\.project
     目录           0  2016-03-21 12:12  smack-test\.settings\
     文件         598  2016-03-21 12:12  smack-test\.settings\org.eclipse.jdt.core.prefs
     目录           0  2016-11-11 16:31  smack-test\bin\
     目录           0  2016-11-11 16:31  smack-test\bin\com\
     文件         607  2016-11-11 16:31  smack-test\bin\com\Test$1.class
     文件         618  2016-11-11 16:31  smack-test\bin\com\Test$10.class
     文件        1368  2016-11-11 16:31  smack-test\bin\com\Test$11$1.class
     文件         963  2016-11-11 16:31  smack-test\bin\com\Test$11.class
     文件        1173  2016-11-11 16:31  smack-test\bin\com\Test$12.class
     文件        1556  2016-11-11 16:31  smack-test\bin\com\Test$13.class
     文件        1641  2016-11-11 16:31  smack-test\bin\com\Test$14.class
     文件         879  2016-11-11 16:31  smack-test\bin\com\Test$2.class
     文件         614  2016-11-11 16:31  smack-test\bin\com\Test$3.class
     文件         827  2016-11-11 16:31  smack-test\bin\com\Test$4.class
     文件         618  2016-11-11 16:31  smack-test\bin\com\Test$5.class
     文件         606  2016-11-11 16:31  smack-test\bin\com\Test$6.class
     文件         612  2016-11-11 16:31  smack-test\bin\com\Test$7.class
     文件         775  2016-11-11 16:31  smack-test\bin\com\Test$8.class
     文件         610  2016-11-11 16:31  smack-test\bin\com\Test$9.class
     文件       14435  2016-11-11 16:31  smack-test\bin\com\Test.class
     目录           0  2016-03-21 14:29  smack-test\lib\
     文件      668180  2016-03-21 14:28  smack-test\lib\bnd.jar
     文件      263965  2016-03-21 14:24  smack-test\lib\commons-codec-1.9.jar
     文件       61829  2016-03-21 14:24  smack-test\lib\commons-logging-1.2.jar
     文件       31293  2016-03-21 14:24  smack-test\lib\fluent-hc-4.5.2.jar
     文件      736658  2016-03-21 14:24  smack-test\lib\httpclient-4.5.2.jar
     文件      158984  2016-03-21 14:24  smack-test\lib\httpclient-cache-4.5.2.jar
     文件       17362  2016-03-21 14:24  smack-test\lib\httpclient-win-4.5.2.jar
............此处省略72个文件信息

评论

共有 条评论