No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0230.xml 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Service Discovery Notifications</title>
  10. <abstract>This specification defines a method for requesting and receiving notifications regarding XMPP service discovery items.</abstract>
  11. &LEGALNOTICE;
  12. <number>0230</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0030</spec>
  20. <spec>XEP-0060</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>NOT YET ASSIGNED</shortname>
  25. &hildjj;
  26. &stpeter;
  27. <revision>
  28. <version>0.1.1</version>
  29. <date>2016-10-04</date>
  30. <initials>egp</initials>
  31. <remark><p>Add forgotten namespace in example 3, and change the text to describe the correct element.</p></remark>
  32. </revision>
  33. <revision>
  34. <version>0.1</version>
  35. <date>2008-01-30</date>
  36. <initials>psa</initials>
  37. <remark><p>Initial published version.</p></remark>
  38. </revision>
  39. <revision>
  40. <version>0.0.2</version>
  41. <date>2008-01-06</date>
  42. <initials>jjh/psa</initials>
  43. <remark><p>Corrected example to use full JIDs and SubIDs.</p></remark>
  44. </revision>
  45. <revision>
  46. <version>0.0.1</version>
  47. <date>2008-01-03</date>
  48. <initials>jjh/psa</initials>
  49. <remark><p>First draft.</p></remark>
  50. </revision>
  51. </header>
  52. <section1 topic='Introduction' anchor='intro'>
  53. <p>&xep0115; defines a way for entities to receive dynamically-updated information about &xep0030; capabilities, rather than polling for updates by sending repeated disco#info requests. However, there is no comparable method for receiving updated disco#items information (this might be helpful when the number of associated entities is large or dynamic, e.g., at a multi-user chat service). This document specifies such a method by re-using semantics from &xep0060;.</p>
  54. </section1>
  55. <section1 topic='Protocol' anchor='protocol'>
  56. <p>Before a requesting entity asks for service discovery items with notifications, it SHOULD send directed presence to the responding entity so that the responding entity knows when to stop sending notifications.</p>
  57. <example caption='Requesting entity sends presence'><![CDATA[
  58. <presence from='bill@shakespeare.lit/globe' to='chat.shakespeare.lit'/>
  59. ]]></example>
  60. <p>The requesting entity then sends a disco#items request to the responding entity, including a &lt;subscribe/&gt; element qualified by the 'http://jabber.org/protocol/pubsub' namespace, which in turn specifies a node of 'http://jabber.org/protocol/disco#items'.</p>
  61. <example caption='Requesting all items'><![CDATA[
  62. <iq type='get'
  63. from='bill@shakespeare.lit/globe'
  64. to='chat.shakespeare.lit'
  65. id='items1'>
  66. <query xmlns='http://jabber.org/protocol/disco#items'>
  67. <subscribe xmlns='http://jabber.org/protocol/pubsub'/>
  68. </query>
  69. </iq>
  70. ]]></example>
  71. <p>If the responding entity does not recognize inclusion of the &lt;subscribe/&gt; element as a child of the &lt;query/&gt; element, it MUST return the service discovery items but MUST NOT send subsequent notifications to the requesting entity.</p>
  72. <p>If the requesting entity did not share presence with the responding entity, the responding entity MUST return the service discovery items but SHOULD NOT send subsequent notifications to the requesting entity.</p>
  73. <p>If the responding entity recognizes inclusion of the &lt;subscribe/&gt; element as a child of the &lt;query/&gt; element and the requesting entity is allowed to receive notifications, the responding entity MUST return the service discovery items (including a &lt;subscription/&gt; element) and SHOULD send subsequent notifications to the requesting entity.</p>
  74. <example caption='Result-set for all items'><![CDATA[
  75. <iq type='result'
  76. from='chat.shakespeare.lit'
  77. to='bill@shakespeare.lit/globe'
  78. id='items1'>
  79. <query xmlns='http://jabber.org/protocol/disco#items'>
  80. <item jid='alls-well-that-ends-well@chat.shakespeare.lit'/>
  81. <item jid='as-you-like-it@chat.shakespeare.lit'/>
  82. <item jid='cleopatra@chat.shakespeare.lit'/>
  83. <item jid='comedy-of-errors@chat.shakespeare.lit'/>
  84. <item jid='coriolanus@chat.shakespeare.lit'/>
  85. <item jid='cymbeline@chat.shakespeare.lit'/>
  86. <item jid='hamlet@chat.shakespeare.lit'/>
  87. <item jid='henry-the-fourth-one@chat.shakespeare.lit'/>
  88. <item jid='henry-the-fourth-two@chat.shakespeare.lit'/>
  89. <item jid='henry-the-fifth@chat.shakespeare.lit'/>
  90. <subscription
  91. xmlns='http://jabber.org/protocol/pubsub'
  92. jid='bill@shakespeare.lit'
  93. subid='some-long-sub-id'
  94. subscription='subscribed'/>
  95. </query>
  96. </iq>
  97. ]]></example>
  98. <p>The responding entity then SHOULD send subsequent notifications to the requesting entity when associated items are added to or deleted from the potential result set.</p>
  99. <example caption='A notification (new item)'><![CDATA[
  100. <message from='chat.shakespeare.lit' to='bill@shakespeare.lit' id='foo'>
  101. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  102. <items node='http://jabber.org/protocol/disco#items'>
  103. <item id='ae890ac52d0df67ed7cfdf51b644e901'>
  104. <item xmlns='http://jabber.org/protocol/disco#items'
  105. jid='henry-the-fifth@chat.shakespeare.lit'/>
  106. </item>
  107. </items>
  108. </event>
  109. </message>
  110. ]]></example>
  111. <example caption='A notification (deleted item)'><![CDATA[
  112. <message from='chat.shakespeare.lit' to='bill@shakespeare.lit' id='bar'>
  113. <event xmlns='http://jabber.org/protocol/pubsub#event'>
  114. <items node='http://jabber.org/protocol/disco#items'/>
  115. <retract id='fa890ca52d0df67de7fcfd51b644c701'>
  116. <item xmlns='http://jabber.org/protocol/disco#items'
  117. jid='cardenio@chat.shakespeare.lit'/>
  118. </retract>
  119. </items>
  120. </event>
  121. </message>
  122. ]]></example>
  123. <p>When the requesting entity goes offline, the responding entity will receive unavailable presence.</p>
  124. <example caption='Responding entity receives unavailable presence'><![CDATA[
  125. <presence from='bill@shakespeare.lit/globe'
  126. to='chat.shakespeare.lit'
  127. type='unavailable'/>
  128. ]]></example>
  129. <p>The responding entity then MUST NOT send further notifications.</p>
  130. </section1>
  131. <section1 topic='Security Considerations' anchor='security'>
  132. <p>This document introduces no new security considerations above and beyond those already defined for service discovery and publish-subscribe.</p>
  133. </section1>
  134. <section1 topic='IANA Considerations' anchor='iana'>
  135. <p>This document requires no interaction with &IANA;.</p>
  136. </section1>
  137. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  138. <p>This document requires no interaction with the &REGISTRAR;.</p>
  139. </section1>
  140. </xep>