freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

xmpp協(xié)議及其服務(wù)器端的openfire插件開發(fā)-資料下載頁

2024-10-28 08:26本頁面

【導(dǎo)讀】XMPP是一種基于XML的協(xié)議,它繼承了在XML環(huán)境中靈活的發(fā)展性。的應(yīng)用具有超強的可擴展性。需求,以及在XMPP的頂端建立如內(nèi)容發(fā)布系統(tǒng)和基于地址的服務(wù)等應(yīng)用程序。應(yīng)用程序戒給一個配好系統(tǒng)添加功能。XMPP是基于可擴展標(biāo)。記語言的協(xié)議,它用于即時消息以及在線現(xiàn)場探測。它在促進服務(wù)器乊間的。這個協(xié)議可能最終允許因特網(wǎng)用戶向因特網(wǎng)上的其他任何人發(fā)送即時消息,即。使其操作系統(tǒng)和瀏覽器丌同。XMPP的前身是Jabber,一個開源形式組織產(chǎn)生的網(wǎng)絡(luò)即時。XMPP目前被IETF國際標(biāo)準(zhǔn)組織完成了標(biāo)準(zhǔn)化工作。XML流傳輸協(xié)議的定義使得XMPP能夠在一個比以往網(wǎng)絡(luò)通信協(xié)議更規(guī)范的平臺上。XML易于解析和閱讀的特性,使得XMPP的協(xié)議能夠非常漂亮。時通訊協(xié)議,諸如AIM,QQ等有功能完整,完善等先進性。XMPP中定義了三個角色,客戶端,服務(wù)器,網(wǎng)關(guān)。而XMPP的核心部分就是一個在網(wǎng)絡(luò)上分片斷發(fā)送XML的流協(xié)。Openfire所要做的二次開發(fā)內(nèi)容,是下一步的實際操作重點。IETF已經(jīng)將Jabber定為即時

  

【正文】 target target name=release depends=jar /target/project 第五章:與客戶端一起調(diào)試 以 debug 模式啟動服務(wù)器,根據(jù)客戶端的需要在相應(yīng)位置設(shè)置端點,分析數(shù)據(jù)。 Openfire 插件開發(fā)心得:基于 XMPP 實現(xiàn)類 Twitter 功能 Openfire 是 XMPP 協(xié)議最好的服務(wù)器軟件。最近修改了一個插件實現(xiàn)了類 Twitter 功能,發(fā)出來分享 Get started 我用的是 debian 作為 Openfire 服務(wù)器 下載 Openfire,安裝 JRE( Jaav運行庫),把 Openfire 跑起來 下載 JDK ,安裝到 /opt/ 下載 openfire 源碼 ,準(zhǔn)備編譯。當(dāng)時我安裝的 oenfire 是 所以源碼也下載的是 版本 。用 tar zxvf 解壓到 /opt/openfire_src 配置系統(tǒng)環(huán)境,聲明 JDK 的環(huán)境變量 export JAVA_HOME=/opt/下載 ant 編譯工具, aptget install ant 呵呵, debian 就是爽。 編寫 Openfire 插件 這是一個及其痛苦的過程,由于我不會 Java,所以報了本《 Thinking in Java》然后對照著 SUN 的官方文檔邊學(xué)邊寫,最后還是鼓搗出來了,呵呵 我的插件是基于 Stefan Reuter 的 userstatus 插件修改的 User Status Plugin is a plugin for the Openfire XMPP server to save the user status to the database. This plugin automatically saves the last status (presence, IP address, logon and logoff time) per user and resource to userStatus table in the Openfire database. Optionally you can archive user status entries (IP address, logon and logoff time) for a specified time. History entries are stored in the userStatusHistory table. The settings for history archiving can be configured on the “User Status Settings” page that you’ll find on the “Server” tab of the Openfire Admin Console. 目錄結(jié)構(gòu)有些變化,我的修改版可以在這里下載 目錄結(jié)構(gòu)是: E:\\DORMFORCE\\NUTALK\\OPENFIRE\\EST\\USERSTATUS│ │ │ │├─i18n│ │├─META INF│ │ │ ││ └─maven│ └─│ └─user status│ │ │├─src│ ├─database│ │ user │ ││ ├─java│ │ └─│ │ └─reucon│ │ └─openfire│ │ └─plugins│ │ └─userstatus│ │ │ ││ └─web│ user │└─web │ │ └─WEB INF 修改了 ,在 userStatus 表增加一個字段 status TEXT,,然后修改 的源碼了 [code:java] package 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import .*。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 //by est import 。 import 。 import 。 /** * UserStatus plugin for Openfire. MOD by est */ public class UserStatusPlugin implements Plugin, PropertyEventListener, SessionEventListener, PresenceEventListener { private static final int SEQ_ID = 510。 private static final String ADD_USER_STATUS = “Insert INTO userStatus (username, resource, online, lastIpAddress, lastLoginDate) ” + “VALUES (?, ?, 1, ?, ?)”。 private static final String UPDATE_USER_STATUS = “UPDATE userStatus SET online = 1, lastIpAddress = ?, lastLoginDate = ? ” + “Where username = ? AND resource = ?”。 private static final String SET_PRESENCE = “UPDATE userStatus SET presence = ?, status = ? Where username = ? AND resource = ?”。 //By est private static final String SET_OFFLINE = “UPDATE userStatus SET online = 0, lastLogoffDate = ? Where username = ? AND resource = ?”。 private static final String SET_ALL_OFFLINE = “UPDATE userStatus SET online = 0″。 private static final String ADD_USER_STATUS_HISTORY = “Insert INTO userStatusHistory (historyID, username, resource, lastIpAddress,” + “l(fā)astLoginDate, lastLogoffDate) VALUES (?, ?, ?, ?, ?, ?)”。 private static final String DELETE_OLD_USER_STATUS_HISTORY = “DELETE From userStatusHistory Where lastLogoffDate ?”。 public static final String HISTORY_DAYS_PROPERTY = “”。 public static final int DEFAULT_HISTORY_DAYS = 1。 /** * Number of days to keep history entries. * 0 for now history entries, 1 for unlimited. */ private int historyDays = DEFAULT_HISTORY_DAYS。 public static final String strSynXCallHubUrlFormat = “ public void initializePlugin(PluginManager manager, File pluginDirectory) { Connection con = null。 PreparedStatement pstmt = null。 historyDays = (HISTORY_DAYS_PROPERTY, DEFAULT_HISTORY_DAYS)。 (this)。 try { con = ()。 pstmt = (SET_ALL_OFFLINE)。 ()。 } catch (SQLException e) { (”Unable to clean up user status”, e)。 } finally { (pstmt, con)。 } for (ClientSession session : ().getSessions()) { sessionCreated(session)。 } (this)。 (this)。 } public void destroyPlugin() { (this)。 (this)。 } public void sessionCreated(Session session) { Connection con = null。 PreparedStatement pstmt = null。 int rowsUpdated = 0。 if (!().getUserManager().isRegisteredUser(())) { return。 } try { con = ()。 pstmt = (UPDATE_USER_STATUS)。 (1, getHostAddress(session))。 (2, (()))。 (3, ().getNode())。 (4, ().getResource())。 rowsUpdated = ()。 } catch (SQLException e) { (”Unable to update user status for ” + (), e)。 } finally { (pstmt, con)。 } if (rowsUpdated == 0) { try { con = ()。 pstmt = (ADD_USER_STATUS)。 (1, ().getNode())。 (2, ().getResource())。 (3, getHostAddress(session))。 (4, (()))。 ()。 } catch (SQLException e) { (”Unable to Insert user status for ” + (), e)。 } finally { (pstmt, con)。 } } } public void sessionDestroyed(Session session) { Connection con = null。 PreparedStatement pstmt = null。 final Date logoffDate。 if (!().getUserManager().isRegisteredUser(())) { return。 } logoffDate = new Date()。 try { con = ()。 pstmt = (SET_OFFLINE)。 (1, (logoffDate))。 (2, ().getNode())。 (3, ().getResource())。 ()。 } catch (SQLException e) { (”Unable to update user status for ” + (), e)。 } finally { (pstmt, con)。 } // write history entry if (historyDays != 0) { try { con = ()。 pstmt = (ADD_USER_STATUS_HISTORY)。 (1, (SEQ_ID))。 (2, ().getNode())。 (3, ().getResource())。 (4, getHostAddress(session))。 (5, (()))。 (6, (logoffDate))。 ()。 } catch (SQLException e) { (”Unable to add user status history for ” + (), e)。 } finally { (pstmt, con)。 } } d
點擊復(fù)制文檔內(nèi)容
醫(yī)療健康相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1