openfire

XMPP学习笔记-LESSON-004:openfire之编译简介

守給你的承諾、 提交于 2019-12-01 13:20:53
of的使用非常简单,便捷,由于开源,下载源码后也可以随意修改,于是编译也就有了了解的必要。 of的构建工具是ant,所以前提你需要下载apache ant,并配置好环境。在此之前,建议了解一下ant,比如熟悉设置property,target,task,depends代表什么意思。 进入build/,打开build.xml,查看有多少个target,每一个target就是一个ant任务(不是task),简单来说就是 ant target-name,比如clean,dist.src,dist.bin,compile等。这里最常用3种,一直就是默认的ant,如果懂ant的话就会知道在build.xml中有个default="openfire",这就是默认的target,即你输入ant回车等同于ant openfire。这个是编译一个默认的版本,在target/openfire中,其中包含了"compile, jspc, -i18n".这个具体意义就不说,build.xml中注释写的比较清晰。第二种就是打包,即生成tar.gz或者zip文件的压缩包,这里类似网上下载的openfire,解压即可用。第三种,就是installer,即生成系统可执行的安装包,比如linux的deb,mac版本的安装包等。这里需要用到install4j,这个东西是一个安装工具,这个我没测试过,这里就不说了

XMPP学习笔记-LESSON-005:XMPPServer.java之Module

一世执手 提交于 2019-12-01 13:20:42
上面讨论过Xmppserver有以下3个方法: loadModules(); // Initize all the modules initModules(); // Start all the modules startModules(); 意思很简单,载入模块,初始化,启动模块。 如何载入的呢? loadModule(RoutingTableImpl.class.getName()); ... ... 这里就是通过loader载入class,这里现以PrivateStorage module为例,说明module如何编写--也可添加自己的module。 Module是个接口,定义一个简单的功能,getName,init,start,stop,destoy.然后实现了一个BasicModule作为所有module的基类,对应的方法都是空的。基本都是在子类中实现,这里有个兴趣点,大家想想这是什么设计模式? 查看PrivateStorage源码,我们来看如何实现的,其它的module类也就大同小异了。 PrivateStorage,除了继承basemodule还实现了UserEventListener接口,这个接口提供了userCreated,userModified,userDeleting功能。这是module的一个通用写法,module定义了模块生命周期

XMPP学习笔记-LESSON-003:XMPPServer.java之initialize​

佐手、 提交于 2019-12-01 13:20:34
上文讲到,ServerStarter通过java反射机制,实例化org.jivesoftware.openfire.XMPPServer,在xmppserver构造函数中,调用start方法,,开始了服务之旅. 首先,我们来看看start方法中,XMPPServer,它都干了什么. 由于篇幅有限,先从initialize部分开始。 1,locateOpenfire, 这个不稀奇,初始化一些数据和环境变量.首先locateOpenfire,顾名思义,找到openfire,这里是指openfire的主目录。怎么找呢?读取配置文件conf/openfire.xml,这里找openfireHome变量。如果没有咋办,这里有一个很有意思的方法:verifyHome,啥意思呢?就是验证openfire主目录在哪?如果之前openfireHome没设置,那么就检查当前上一级目录(..),如果还没找到,就找web/WEB-INF/openfire_init.xml配置,还没找到,就抛异常了,.....,也别干了,收工吧。当然如果找到了,就保存到配置JiveGlobals中,这个JiveGlobals非常重要,以后说?感觉是不是很纠结啊,这主要考虑到一些安装配置的一些情况,从而也可以看出设置的优先级,简单来说,如果我们在环境变量中直接设置openfireHome,就哦了,清楚告诉它,也就不纠结了。

XMPPFramework TLS/SSL connection with Openfire

狂风中的少年 提交于 2019-12-01 12:57:17
I'm trying to set up a secure connection TLS/SSL beetween my client apps and an OPENFIRE server. I'm using the XMPPFramework for iOS, how can i do that? I have already tried to change the openfire security settings to made required a secured connection, but in this way, my app won't connect to server. I think that i have to set something in the xmppframework but i can't find any instruction. My connection code : - (void)setupStream { NSAssert(xmppStream == nil, @"Method setupStream invoked multiple times"); // Setup xmpp stream // // The XMPPStream is the base class for all activity. //

Chat functionality in web application using XMPP and Openfire

岁酱吖の 提交于 2019-12-01 12:56:20
问题 I want to create chat functionality in my web application using XMPP and Openfire.. I have integrated converse js but I haven't found file attachment so any one let me know another best option using XMPP and openfire?? 回答1: Here is a very simple chat demo written in jQuery + StropheJS : http://plnkr.co/edit/EhQHDsYpDhrECmaaIlZO You have to deploy your own Openfire and adapt the followin code lines according to your configuration: var server = 'mydomain.com'; var BOSH_SERVICE = 'http://127.0.0

Asmack file transfer progress always at 0.0

我的未来我决定 提交于 2019-12-01 12:40:21
问题 Hi there i am using asmack-android-19-0.8.10.jar and openfire to develop file transfer. i refered to harryjoy.me but i have problems when sending the file where transfer.getProgress() always return 0.0. below is the log file. Send File : 05-06 15:42:35.669: D/SMACK(25533): 03:42:35 PM SENT (1103132248): <iq id="7dnrX-23" to="lala@kaoru-pc/Smack" from="lolo@kaoru-pc/Smack" type="set"> <si xmlns="http://jabber.org/protocol/si" id="jsi_8243824082816759940" mime-type="image/jpeg" profile="http:/

Android Smack 4.1.1 File Transfering, ERROR Could not establish socket

╄→гoц情女王★ 提交于 2019-12-01 12:11:31
I am trying to send files over my android app with smack library 4.1.1, though i am having some errors to do so. The thing is that i don't know why it just sends the files to a device but after that it doesn't let me to send to others and others can't send to others either, for example the first time i opened a listener with one device, that device could and can still send files just to one device (the first that it sent) but the one that receives can not, the file seems to arrive but with 0 data or maybe it doesn't arrive and just when arrives something causes error i am not sure but after a

Android Smack 4.1.1 File Transfering, ERROR Could not establish socket

佐手、 提交于 2019-12-01 11:43:42
问题 I am trying to send files over my android app with smack library 4.1.1, though i am having some errors to do so. The thing is that i don't know why it just sends the files to a device but after that it doesn't let me to send to others and others can't send to others either, for example the first time i opened a listener with one device, that device could and can still send files just to one device (the first that it sent) but the one that receives can not, the file seems to arrive but with 0

开源的企业级IM:openfire+spark

天大地大妈咪最大 提交于 2019-12-01 10:39:46
缘于公司使用的通讯通RTX,按用户数购买license,于是乎我就想到网上找找有没有开源的。 百度之,推荐的有IPMSG,飞秋,和openfire+spark。 1、IPMSG,功能简单易用,就是界面粗糙了点。 2、飞秋,在IPMSG基础上加上了类似QQ的界面风格,而且文件传输什么的更好用了。 3、openfire+spark,以上2个软件的缺点是无法发送离线消息,而且历史聊天记录很容易丢失,组织架构随意且混乱。那么这个组合就比较符合要求,虽然和RTX相比,对中文支持不美观,而且不符合长期使用QQ的用户的习惯。 对比RTX,openfire+spark特点如下: 1、没有群,只有会议室,会议室是人来人往,不像群一样固定,但是可以限定那些人可以进入会议室。会议室可以在服务器端设置为固定的,或者在客户端创建临时的。 2、可以像RTX一样在服务器端设置统一的组织架构,而且可以简单实现多级架构,在客户端为spark的时候,方法为:在组的显示名中以 :: (空格,冒号,冒号,空格)分隔主组和子组,而且主组不能有成员,且在spark中会显示一行“此组没有用户在线”的提示,很不友好。 3、可以从客户端申请新用户。 4、会话框不符合国人习惯。 来源: oschina 链接: https://my.oschina.net/u/105376/blog/37418

Jabber Openfire server v3.6.0a+ - how do I use Hybrid authentication?

↘锁芯ラ 提交于 2019-12-01 10:23:37
问题 I'm setting up a Jabber server for my website. I've already got some user accounts in place in the openfire database, and working IMs between them. I'm now looking to add (some) of the users from my main database ( members table, with login , password [plain text]) and allowed_to_IM [0 or 1] fields) to allow them to communicate between themselves. The Hybrid authentication is a new feature in v3.6.0a however, and there's little documentation in what configuration is required in the openfire