tigase的message流转

写在前面:之前是做openfire,现转弄tigase,对tigase管道流的作风还不是很了解。简单整理了下Message的流程,不妥之处,还请各位指正。
该地址有些tigae官网的翻译文章:https://chutianxing.wordpress.com/tag/tigase/page/2/  可能需要翻墙
 
建议学习tigae流程时多看日志
init.properties文件里的日志开关 --debug=server (表示记录tigase.server包里的日志),多个包用逗号分隔,例如:--debug=server,xmpp,net
1. tigase服务端接收处理客户端发送的message的类都在tigase.io和tigase.net。tigase.io更底层,接收网络数据,由tigase.net处理解析成xml对象,并将packet放到接收队列receivedPackets中。

此时的packet :packetFrom=null,packetTo=null

(packet的属性里面有packetFrom、packetTo 这是组件间传递用的地址,而stanzaFrom、stanzaTo是客户端或者muc的地址)

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
           
           
@Override
public IOService <?> call () throws IOException {
writeData ( null );
boolean readLock = true ;
if ( stopping ) {
stop ();
} else {
readLock = readInProgress . tryLock ();
if ( readLock ) {
try {
//解析成XML并将packet放入receivedPackets接收队列
processSocketData ();
if (( receivedPackets () > 0 ) && ( serviceListener != null )) {
//给packet设置一些属性,并放到被QueueListener监听的队列中
serviceListener . packetsReady ( this );
} // end of if (receivedPackets.size() > 0)
} finally {
readInProgress . unlock ();
}
}
}
return readLock
? this
: null ;
}
 来自CODE的代码片
IOService.call.java
 

其中serviceListener.packetsReady(this) ----> ConnectionManager.packetsReady

----> writePacketsToSocket(serv, processSocketData(serv));

---->ClientConnectionManager.processSocketData(XMPPIOService<Object>serv),

最终在processSocketData方法中设置packet的一些属性,通过addOutPacket(Packet packet)方法将packet放入out_queues队列。

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
           
           
@Override
public Queue < Packet > processSocketData ( XMPPIOService < Object > serv ) {
JID id = serv . getConnectionId ();
Packet p = null ;
while (( p = serv . getReceivedPackets (). poll ()) != null ) {
...
if ( p . getAttributeStaticStr ( Packet . XMLNS_ATT ) == null ) {
p . setXMLNS ( XMLNS );
.....
}
p . setPacketFrom ( id );
JID receiver = serv . getDataReceiver ();
if ( receiver != null ) {
p . setPacketTo ( serv . getDataReceiver ());
addOutPacket ( p );
} else {
...
}
// TODO: Implement sending 'req' attributes by the server too
} // end of while ()
return null ;
}
 来自CODE的代码片
ClientCM.processSocketData.java

将 connectionId : c2s@user-20140808fs/127.0.0.1_5222_127.0.0.1_56591 设置为packetFrom,组件sess_man的jidsess-man@user-20140808fs设置为packetTo,以及设置XMLNS=jabber:client。

此时packet: from=c2s@user-20140808fs/127.0.0.1_5222_127.0.0.1_54883 ,to=sess-man@user-20140808fs

2. packet 的进出都被AbstractMessageReceiver的内部类QueueListener监听,并加入到 queue队列中,run()方法从queue队列中取出packet,根据type分发。

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a>
           
           
private class QueueListener extends Thread {
...
private PriorityQueueAbstract < Packet > queue ;
...
@Override
public void run () {
...
while (! threadStopped ) {
try {
// 现在处理下一个等待的packet
packet = queue . take ();
++ packetCounter ;
switch ( type ) {
case IN_QUEUE :
...
if ( task != null ) {
task . handleResponse ( packet );
} else {
...
if (! processed && (( packet = filterPacket ( packet , incoming_filters )) !=
null )) {
processPacket ( packet );
}
...
}
break ;
case OUT_QUEUE :
if (( packet = filterPacket ( packet , outgoing_filters )) != null ) {
processOutPacket ( packet );
}
break ;
default :
log . log ( Level . SEVERE , "Unknown queue element type: {0}" , type );
break ;
} // end of switch (qel.type)
} catch ( InterruptedException e ) {
...
} catch ( Exception e ) {
...
} // end of try-catch
} // end of while (! threadStopped)
}
}
 来自CODE的代码片
QueueListener.java
3. packet 由case OUT_QUEUE分支 的 processOutPacket(packet) 分发,交给上层组件MessageRouter处理,MessageRouter把packet塞到in_queues
packet被塞到out_queue和in_queue的动作都被QueueListener监听,并加上type放到自己的queue中,等待处理。

4. packet 被从queue取出,经CASE IN_QUEUE分支的processPacket(packet)分发。

MessageRouter.processPacket(Packet packet)部分代码如下:

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
           
           
@Override
public void processPacket ( Packet packet ) {
//getTo 方法取pcketTo的值,若为空,则取stanzaTo(<message/>中的to)
if ( packet . getTo () == null ) {
return ;
}
...
//匹配分发组件
ServerComponent comp = getLocalComponent ( packet . getTo ());
if ( comp != null ) {
Queue < Packet > results = new ArrayDeque < Packet >();
if ( comp == this ) {
processPacketMR ( packet , results );
} else {
...
comp . processPacket ( packet , results );
}
...
return ;
}
...
}
 来自CODE的代码片
MessageRouter.processPacket.java

根据to=sess-man@user-20140808fs匹配, Packet will be processed by:sess-man@user-20140808fs,由AbstractMessageReceiver的非阻塞性方法addPacketNB(Packet packet)加入到in_queues。

5. 组件sess-man@user-20140808fs从queue拿到packet由SessionManager.processPacket(final Packet packet)处理。
<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
           
           
@Override
public void processPacket ( final Packet packet ) {
if ( log . isLoggable ( Level . FINEST )) {
log . log ( Level . FINEST , "Received packet: {0}" , packet . toStringSecure ());
}
...
XMPPResourceConnection conn = getXMPPResourceConnection ( packet );
...
processPacket ( packet , conn );
}
 来自CODE的代码片
SessionManager.processPacket.java
其中getXMPPResourceConnection(packet)方法,返回conn。packet再由SessionManager.processPacket(packet, conn)处理。
代码:
<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
            
            
protected void processPacket ( Packet packet , XMPPResourceConnection conn ) {
...
packet . setPacketTo ( getComponentId ());
...
if (! stop ) {
//授权匹配的processor处理packet
walk ( packet , conn );
try {
if (( conn != null ) && conn . getConnectionId (). equals ( packet . getPacketFrom ())) {
handleLocalPacket ( packet , conn );
}
} catch ( NoConnectionIdException ex ) {
...
}
}
...
}
 来自CODE的代码片
SessionManager.processPacket.java
packetTo被设置为组件ID( sess-man@user-20140808fs),其值原先也是这个。
其中walk(packet, conn)方法,匹配处理器(授权)。对于message,此处匹配到的processor是amp和message-carbons,message-carbons没有怎么处理,主要是amp在处理,packet被塞amp的队列中等待处理。
<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
            
            
private void walk ( final Packet packet , final XMPPResourceConnection connection ) {
for ( XMPPProcessorIfc proc_t : processors . values ()) {
XMPPProcessorIfc processor = proc_t ;
//根据element和xmlns,授权匹配成功的processor
Authorization result = processor . canHandle ( packet , connection );
if ( result == Authorization . AUTHORIZED ) {
....
ProcessingThreads < ProcessorWorkerThread > pt = workerThreads . get ( processor . id ());
if ( pt == null ) {
pt = workerThreads . get ( defPluginsThreadsPool );
}
//packet 放到(addItem)授权了的processor的队列
if ( pt . addItem ( processor , packet , connection )) {
packet . processedBy ( processor . id ());
} else {
...
}
} else {
...
}
}
}
 来自CODE的代码片
SessionManage.walk.java
6. WorkerThread.run() 从队列中取出packet,由SessionManager.process(QueueItem item)给amp处理。

SessionManager.pocess(QueueItem item) 如下:

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
           
           
@Override
public void process ( QueueItem item ) {
XMPPProcessorIfc processor = item . getProcessor ();
try {
//由授权的 processor 处理 packet
processor . process ( item . getPacket (), item . getConn (), naUserRepository ,
local_results , plugin_config . get ( processor . id ()));
if ( item . getConn () != null ) {
setPermissions ( item . getConn (), local_results );
}
addOutPackets ( item . getPacket (), item . getConn (), local_results );
} catch ( PacketErrorTypeException e ) {
...
} catch ( XMPPException e ) {
...
}
}
 来自CODE的代码片
SessionManage.process.java
其中processor.process( , , , ,)------> MessageAmp.process(),如下:
<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
           
           
@Override
public void process ( Packet packet , XMPPResourceConnection session ,
NonAuthUserRepository repo , Queue < Packet > results , Map < String , Object > settings )
throws XMPPException {
if ( packet . getElemName () == "presence" ) {
...
} else {
Element amp = packet . getElement (). getChild ( "amp" , XMLNS );
if (( amp == null ) || ( amp . getAttributeStaticStr ( "status" ) != null )) {
messageProcessor . process ( packet , session , repo , results , settings );
} else {
...
}
}
 来自CODE的代码片
MessageAmp.process.java

其中messageProcessor.process(, , , ,) --------> Message.process(),如下:

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
           
           
@Override
public void process ( Packet packet , XMPPResourceConnection session ,
NonAuthUserRepository repo , Queue < Packet > results , Map < String , Object > settings )
throws XMPPException {
...
try {
...
// Remember to cut the resource part off before comparing JIDs
id = ( packet . getStanzaFrom () != null )
? packet . getStanzaFrom (). getBareJID ()
: null ;
// Checking if this is maybe packet FROM the client
if ( session . isUserId ( id )) {
// This is a packet FROM this client, the simplest action is
// to forward it to is't destination:
// Simple clone the XML element and....
// ... putting it to results queue is enough
results . offer ( packet . copyElementOnly ());
return ;
}
} catch ( NotAuthorizedException e ) {
...
} // end of try-catch
}
 来自CODE的代码片
Message.process.java
检查stanzaFfrom与session匹配通过后,将packet.copyElementOnly()放到results中,作后续投递,原来的packet 就丢弃了。
此时投递的packet : packetFrom=null,packetTo=null
packet在SessionManager.addOutPacket(Packet packet)中判断packetFrom是否为空,为空则将其设置为ComponentId(此处为 sess-man@user-20140808fs),然后调用父类(AbstractMessageReceiver.java) 的addOutPacket(packet)方法塞到 out_queue 队列中。
此时packet:: packetFrom= sess-man@user-20140808fs ,packetTo=mull
7. 如同步骤3,上层组件MessageRouter处理,把packet塞到in_queues.
8. 如同步骤4,不同的是 PacketTo为空,packet.getTo()的返回值是stanzaTo。

getLocalComponent(packet.getTo());方法根据stanzaTo与compId、comp name、Component都匹配不到。

此时packet会给组件SessionManager处理,Packet will be processed by: sess-man@user-20140808fs,由AbstractMessageReceiver的非阻塞性方法addPacketNB(Packet packet)加入到in_queues。

9. 如同步骤5,

不同的是在getXMPPResourceConnection(packet)方法中,

conn = connectionsByFrom.get(from)返回值是null,所以是根据stanzaTo取获取接收方的session,返回接收方连接的Connection。

<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
           
           
protected XMPPResourceConnection getXMPPResourceConnection ( Packet p ) {
XMPPResourceConnection conn = null ;
JID from = p . getPacketFrom ();
if ( from != null ) {
conn = connectionsByFrom . get ( from );
if ( conn != null ) {
return conn ;
}
}
// It might be a message _to_ some user on this server
// so let's look for established session for this user...
JID to = p . getStanzaTo ();
if ( to != null ) {
...
conn = getResourceConnection ( to );
} else {
...
} // end of else
return conn ;
}
 来自CODE的代码片
SM.getXMPPResourceConn.java
然后packetTo被设置为组件ID( sess-man@user-20140808fs)。
此时packet:: packetFrom =  sess-man@user-20140808fs ,packetTo = sess-man@user-20140808fs
之后packet又经walk(packet, conn)方法,匹配处理器(授权),扔给amp处理。
10.如同步骤6,直到Message.process(),如下:
<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a>
           
           
@Override
public void process ( Packet packet , XMPPResourceConnection session ,
NonAuthUserRepository repo , Queue < Packet > results , Map < String , Object > settings )
throws XMPPException {
...
try {
// Remember to cut the resource part off before comparing JIDs
BareJID id = ( packet . getStanzaTo () != null )
? packet . getStanzaTo (). getBareJID ()
: null ;
// Checking if this is a packet TO the owner of the session
if ( session . isUserId ( id )) {
..
// Yes this is message to 'this' client
List < XMPPResourceConnection > conns = new ArrayList < XMPPResourceConnection >( 5 );
// This is where and how we set the address of the component
// which should rceive the result packet for the final delivery
// to the end-user. In most cases this is a c2s or Bosh component
// which keep the user connection.
String resource = packet . getStanzaTo (). getResource ();
if ( resource == null ) {
// If the message is sent to BareJID then the message is delivered to
// all resources
conns . addAll ( session . getActiveSessions ());
} else {
// Otherwise only to the given resource or sent back as error.
XMPPResourceConnection con = session . getParentSession (). getResourceForResource (
resource );
if ( con != null ) {
conns . add ( con );
}
}
// MessageCarbons: message cloned to all resources? why? it should be copied only
// to resources with non negative priority!!
if ( conns . size () > 0 ) {
for ( XMPPResourceConnection con : conns ) {
Packet result = packet . copyElementOnly ();
result . setPacketTo ( con . getConnectionId ());
// In most cases this might be skept, however if there is a
// problem during packet delivery an error might be sent back
result . setPacketFrom ( packet . getTo ());
// Don't forget to add the packet to the results queue or it
// will be lost.
results . offer ( result );
...
}
} else {
....
}
return ;
} // end of else
...
} catch ( NotAuthorizedException e ) {
...
} // end of try-catch
}
 来自CODE的代码片
Message.process2.java

检查stanzaTo与session匹配通过后,根据session拿到接收方所有的连接(可能多端登陆),然后Packet result = packet.copyElementOnly()生成新的packet(原packet丢弃了),并将packetTo设置为接收方连接的ConnectionId(例如:c2s@user-20140808fs/127.0.0.1_5222_127.0.0.1_50536),通过addOutPacket()方法塞到out_queue队列。

此时packet:packetFrom = sess-man@user-20140808fs,packetTo =c2s@user-20140808fs/127.0.0.1_5222_127.0.0.1_50536

11. 如同步骤3、4 。不同的是 根据packetTo匹配到组件 c2s@user-20140808fs
12. 组件 c2s@user-20140808fs 从queue中取出packet,分发
<a target=_blank id="L1" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/Cancer_DD/article/details/38872497#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
           
           
public void processPacket ( final Packet packet ) {
...
if ( packet . isCommand () && ( packet . getCommand () != Command . OTHER )) {
...
} else {
// 把packet 发送给客户端
if (! writePacketToSocket ( packet )) {
...
}
} // end of else
}
 来自CODE的代码片
ClientCM.processPacket.java
ps:muc的message与此类似,一直到步骤8匹配到的分发组件是 muc@user-20140808fs,MUC组件分发的时候给每个组员生成一个packet(packetFrom=null, packetTo=null),扔到队列,接下来又是步骤6中的判断packetFrom是否为空,为空则将其设置为ComponentId()......
附草图一张:
 
潜水N久,第一次写博客。。。鞠躬下台  再见
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
来自官网,更新于201704。官网在国外很难下载,现在放到这里方便国内的朋友下载研究。 F:. │ .gitignore │ build.gradle │ gradle.properties │ gradlew │ gradlew.bat │ settings.gradle │ tigase_dir.txt │ ├─.git │ │ config │ │ description │ │ HEAD │ │ index │ │ packed-refs │ │ │ ├─hooks │ │ applypatch-msg.sample │ │ commit-msg.sample │ │ post-update.sample │ │ pre-applypatch.sample │ │ pre-commit.sample │ │ pre-push.sample │ │ pre-rebase.sample │ │ pre-receive.sample │ │ prepare-commit-msg.sample │ │ update.sample │ │ │ ├─info │ │ exclude │ │ │ ├─logs │ │ │ HEAD │ │ │ │ │ └─refs │ │ ├─heads │ │ │ master │ │ │ │ │ └─remotes │ │ └─origin │ │ HEAD │ │ │ ├─objects │ │ ├─info │ │ └─pack │ │ pack-a5985fcf6d3d54c95897e6cf9f133139e5ee10c1.idx │ │ pack-a5985fcf6d3d54c95897e6cf9f133139e5ee10c1.pack │ │ │ └─refs │ ├─heads │ │ master │ │ │ ├─remotes │ │ └─origin │ │ HEAD │ │ │ └─tags ├─app │ │ .gitignore │ │ build.gradle │ │ proguard-rules.pro │ │ │ └─src │ ├─androidTest │ │ └─java │ │ └─org │ │ └─tigase │ │ └─messenger │ │ └─phone │ │ └─pro │ │ ApplicationTest.java │ │ │ ├─main │ │ │ AndroidManifest.xml │ │ │ │ │ ├─java │ │ │ └─org │ │ │ └─tigase │ │ │ └─messenger │ │ │ ├─jaxmpp │ │ │ │ └─android │ │ │ │ ├─caps │ │ │ │ │ CapabilitiesDBCache.java │ │ │ │ │ CapsDbHelper.java │ │ │ │ │ │ │ │ │ ├─chat │ │ │ │ │ AndroidChatManager.java │ │ │ │ │ ChatProvider.java │ │ │ │ │ MarkAsRead.java │ │ │ │ │ OpenChatDbHelper.java │ │ │ │ │ │ │ │ │ ├─muc │ │ │ │ │ AndroidRoomsManager.java │ │ │ │ │ │ │ │ │ └─roster │ │ │ │ AndroidRosterStore.java │ │ │ │ RosterDbHelper.java │ │ │ │ RosterProvider.java │ │ │ │ │ │ │ └─phone │ │ │ └─pro │ │ │ │ AboutActivity.java │ │ │ │ DividerItemDecoration.java │ │ │ │ MainActivity.java │ │ │ │ MessengerApplication.java │ │ │ │ StatusSelectorAdapter.java │ │ │ │ │ │ │ ├─account │ │ │ │ AccountsConstants.java │ │ │ │ Authenticator.java │ │ │ │ AuthenticatorService.java │ │ │ │ ConnectionChecker.java │ │ │ │ LoginActivity.java │ │ │ │ NewAccountActivity.java │ │ │ │ │ │ │ ├─conenctionStatus │ │ │ │ ConnectionStatusesFragment.java │ │ │ │ StatusesRecyclerViewAdapter.java │ │ │ │ ViewHolder.java │ │ │ │ │ │ │ ├─conversations │ │ │ │ │ AbstractConversationActivity.java │ │ │ │ │ │ │ │ │ ├─chat │ │ │ │ │ ChatActivity.java │ │ │ │ │ ChatItemFragment.java │ │ │ │ │ MyChatItemRecyclerViewAdapter.java │ │ │ │ │ ViewHolder.java │ │ │ │ │ │ │ │ │ └─muc │ │ │ │ JoinMucActivity.java │ │ │ │ MucActivity.java │ │ │ │ MucItemFragment.java │ │ │ │ MucItemRecyclerViewAdapter.java │ │ │ │ ViewHolder.java │ │ │ │ │ │ │ ├─db │ │ │ │ CPresence.java │ │ │ │ CursorRecyclerViewAdapter.java │ │ │ │ DatabaseContract.java │ │ │ │ DatabaseHelper.java │ │ │ │ RosterProviderExt.java │ │ │ │ │ │ │ ├─notifications │ │ │ │ MessageNotification.java │ │ │ │ │ │ │ ├─openchats │ │ │ │ MyOpenChatItemRecyclerViewAdapter.java │ │ │ │ OpenChatItemFragment.java │ │ │ │ ViewHolder.java │ │ │ │ │ │ │ ├─providers │ │ │ │ ChatProvider.java │ │ │ │ RosterProvider.java │ │ │ │ │ │ │ ├─roster │ │ │ │ │ MyRosterItemRecyclerViewAdapter.java │ │ │ │ │ PresenceIconMapper.java │ │ │ │ │ RosterItemFragment.java │ │ │ │ │ ViewHolder.java │ │ │ │ │ │ │ │ │ ├─contact │ │ │ │ │ EditContactActivity.java │ │ │ │ │ │ │ │ │ └─request │ │ │ │ SubscriptionRequestActivity.java │ │ │ │ │ │ │ ├─service │ │ │ │ AndroidLoggingHandler.java │ │ │ │ AutopresenceManager.java │ │ │ │ DataRemover.java │ │ │ │ Features.java │ │ │ │ MobileModeFeature.java │ │ │ │ SecureTrustManagerFactory.java │ │ │ │ ServiceRestarter.java │ │ │ │ StanzaExecutor.java │ │ │ │ XMPPService.java │ │ │ │ │ │ │ ├─settings │ │ │ │ AppCompatPreferenceActivity.java │ │ │ │ SettingsActivity.java │ │ │ │ │ │ │ └─utils │ │ │ AsyncDrawable.java │ │ │ AvatarHelper.java │ │ │ BitmapWorkerTask.java │ │ │ DiskLruCache.java │ │ │ ImageHelper.java │ │ │ │ │ └─res │ │ ├─drawable │ │ │ ic_accounts_24dp.xml │ │ │ ic_add.xml │ │ │ ic_add_chat_24dp.xml │ │ │ ic_connection_info_24dp.xml │ │ │ ic_groupchat_24dp.xml │ │ │ ic_menu_about.xml │ │ │ ic_menu_chats.xml │ │ │ ic_menu_roster.xml │ │ │ ic_menu_settings.xml │ │ │ ic_message_delivered_24dp.xml │ │ │ ic_message_not_sent_24dp.xml │ │ │ ic_message_sent_24dp.xml │ │ │ ic_messenger_icon.xml │ │ │ ic_muc_24dp.xml │ │ │ ic_send_24dp.xml │ │ │ message_bubble_error.9.png │ │ │ message_bubble_received.9.png │ │ │ message_bubble_received_4.9.png │ │ │ message_bubble_sent.9.png │ │ │ message_bubble_sent_1.9.png │ │ │ message_bubble_sysmsg.9.png │ │ │ presence_away.xml │ │ │ presence_chat.xml │ │ │ presence_dnd.xml │ │ │ presence_error.xml │ │ │ presence_offline.xml │ │ │ presence_online.xml │ │ │ presence_unknown.xml │ │ │ presence_xa.xml │ │ │ side_nav_bar.xml │ │ │ user_avatar.png │ │ │ │ │ ├─drawable-hdpi │ │ │ ic_info_black_24dp.png │ │ │ ic_launcher.png │ │ │ ic_notifications_black_24dp.png │ │ │ ic_sync_black_24dp.png │ │ │ │ │ ├─drawable-mdpi │ │ │ ic_info_black_24dp.png │ │ │ ic_launcher.png │ │ │ ic_notifications_black_24dp.png │ │ │ ic_sync_black_24dp.png │ │ │ │ │ ├─drawable-v21 │ │ │ ic_info_black_24dp.xml │ │ │ ic_notifications_black_24dp.xml │ │ │ ic_sync_black_24dp.xml │ │ │ │ │ ├─drawable-xhdpi │ │ │ ic_info_black_24dp.png │ │ │ ic_launcher.png │ │ │ ic_notifications_black_24dp.png │ │ │ ic_sync_black_24dp.png │ │ │ │ │ ├─drawable-xxhdpi │ │ │ ic_info_black_24dp.png │ │ │ ic_launcher.png │ │ │ ic_notifications_black_24dp.png │ │ │ ic_sync_black_24dp.png │ │ │ │ │ ├─drawable-xxxhdpi │ │ │ ic_info_black_24dp.png │ │ │ ic_launcher.png │ │ │ ic_notifications_black_24dp.png │ │ │ ic_sync_black_24dp.png │ │ │ │ │ ├─layout │ │ │ account_list_item.xml │ │ │ activity_about.xml │ │ │ activity_chat.xml │ │ │ activity_edit_contact.xml │ │ │ activity_join_muc.xml │ │ │ activity_login.xml │ │ │ activity_main.xml │ │ │ activity_muc.xml │ │ │ activity_new_account.xml │ │ │ activity_subscription_request.xml │ │ │ app_bar_main.xml │ │ │ content_chat.xml │ │ │ content_main.xml │ │ │ content_muc.xml │ │ │ fragment_chatitem_error.xml │ │ │ fragment_chatitem_list.xml │ │ │ fragment_chatitem_received.xml │ │ │ fragment_chatitem_sent.xml │ │ │ fragment_chatitem_sysmsg.xml │ │ │ fragment_connectionstatusitem.xml │ │ │ fragment_connectionstatus_list.xml │ │ │ fragment_groupchatitem_received.xml │ │ │ fragment_groupchatitem_sent.xml │ │ │ fragment_mucitem_list.xml │ │ │ fragment_openchatitem.xml │ │ │ fragment_openchatitem_list.xml │ │ │ fragment_rosteritem.xml │ │ │ fragment_rosteritem_list.xml │ │ │ nav_header_main.xml │ │ │ status_selectoritem.xml │ │ │ │ │ ├─menu │ │ │ activity_main_drawer.xml │ │ │ chatitem_context.xml │ │ │ connection_status_context.xml │ │ │ main.xml │ │ │ menu_chat.xml │ │ │ openchat_chat_context.xml │ │ │ openchat_fragment.xml │ │ │ openchat_groupchat_context.xml │ │ │ roster_context.xml │ │ │ roster_fragment.xml │ │ │ │ │ ├─mipmap-xhdpi │ │ │ ic_launcher.png │ │ │ │ │ ├─mipmap-xxhdpi │ │ │ ic_launcher.png │ │ │ │ │ ├─mipmap-xxxhdpi │ │ │ ic_launcher.png │ │ │ │ │ ├─raw │ │ │ trust_store_bks │ │ │ │ │ ├─values │ │ │ attrs.xml │ │ │ colors.xml │ │ │ dimens.xml │ │ │ strings.xml │ │ │ styles.xml │ │ │ │ │ ├─values-v21 │ │ │ styles.xml │ │ │ │ │ ├─values-w820dp │ │ │ dimens.xml │ │ │ │ │ └─xml │ │ account_preferences.xml │ │ authenticator.xml │ │ pref_accounts_list.xml │ │ pref_data_sync.xml │ │ pref_general.xml │ │ pref_headers.xml │ │ pref_notification.xml │ │ │ └─test │ └─java │ └─org │ └─tigase │ └─messenger │ └─phone │ └─pro │ ExampleUnitTest.java │ ├─documentation │ │ build.gradle │ │ │ └─src │ └─asciidoc │ │ index.asciidoc │ │ │ ├─css │ │ docbook-xsl.css │ │ │ ├─images │ │ Accounts.png │ │ ArchiveChat.png │ │ General.png │ │ JoinChat.png │ │ LeaveRoom.png │ │ Menu.png │ │ MUC.png │ │ Notifications.png │ │ Options.png │ │ Register.png │ │ Roster.png │ │ Screenshot_2015-04-26-13-38-30.png │ │ Screenshot_2015-04-26-13-38-46.png │ │ Screenshot_2015-04-26-13-40-14.png │ │ Screenshot_2015-04-26-13-40-53.png │ │ Screenshot_2015-04-26-13-41-20.png │ │ Screenshot_2015-04-26-13-41-42.png │ │ Screenshot_2015-04-26-13-42-20.png │ │ Screenshot_2015-04-26-13-43-54.png │ │ Screenshot_2015-04-26-14-00-37.png │ │ Screenshot_2015-04-26-14-00-49.png │ │ Screenshot_2015-04-26-14-00-56.png │ │ Screenshot_2015-04-26-14-01-13.png │ │ Screenshot_2015-04-26-14-01-23.png │ │ Screenshot_2015-04-26-14-01-31.png │ │ Screenshot_2015-04-26-14-01-50.png │ │ Screenshot_2015-04-26-14-02-01.png │ │ Screenshot_2015-04-26-14-02-36.png │ │ Screenshot_2015-04-26-14-03-06.png │ │ Screenshot_2015-04-26-14-03-16.png │ │ Screenshot_2015-04-26-14-04-35.png │ │ Screenshot_2015-04-26-14-05-35.png │ │ Screenshot_2015-04-26-14-06-03.png │ │ Screenshot_2015-04-26-14-07-03.png │ │ Screenshot_2015-04-26-14-07-11.png │ │ Screenshot_2015-04-26-14-08-09.png │ │ Screenshot_2015-04-26-14-09-31.png │ │ Screenshot_2015-04-26-14-15-35.png │ │ Screenshot_2015-04-26-14-18-03.png │ │ Status.png │ │ tiger-looking-left-small.png │ │ Welcome.png │ │ │ └─text │ Tigase_Tigase_Android_Messenger-General_overview.asciidoc │ Tigase_Tigase_Android_Messenger-User_guide.asciidoc │ └─gradle └─wrapper gradle-wrapper.jar gradle-wrapper.properties

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值