📄 pubsubservice.html
字号:
<A NAME="isServiceAdmin(org.xmpp.packet.JID)"><!-- --></A><H3>isServiceAdmin</H3><PRE>boolean <B>isServiceAdmin</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> user)</PRE><DL><DD>Returns true if the specified user is a sysadmin of the pubsub service or has admin privileges.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user to check if he has admin privileges.<DT><B>Returns:</B><DD>true if the specified user is a sysadmin of the pubsub service or has admin privileges.</DL></DD></DL><HR><A NAME="isInstantNodeSupported()"><!-- --></A><H3>isInstantNodeSupported</H3><PRE>boolean <B>isInstantNodeSupported</B>()</PRE><DL><DD>Returns true if the pubsub service allows users to create nodes without specifying the node ID. The service will create a random node ID and assigne it to the node.<P><DD><DL><DT><B>Returns:</B><DD>true if the pubsub service allows users to create nodes without specifying the node ID.</DL></DD></DL><HR><A NAME="isCollectionNodesSupported()"><!-- --></A><H3>isCollectionNodesSupported</H3><PRE>boolean <B>isCollectionNodesSupported</B>()</PRE><DL><DD>Returns true if the pubsub service supports collection nodes. When collection nodes is supported it is possible to create hierarchy of nodes where a <A HREF="../../../../org/jivesoftware/openfire/pubsub/CollectionNode.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>CollectionNode</CODE></A> may only hold children nodes of type <A HREF="../../../../org/jivesoftware/openfire/pubsub/CollectionNode.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>CollectionNode</CODE></A> or <A HREF="../../../../org/jivesoftware/openfire/pubsub/LeafNode.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>LeafNode</CODE></A>. On the other hand, <A HREF="../../../../org/jivesoftware/openfire/pubsub/LeafNode.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>LeafNode</CODE></A> can only hold <A HREF="../../../../org/jivesoftware/openfire/pubsub/PublishedItem.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>PublishedItem</CODE></A>.<P><DD><DL><DT><B>Returns:</B><DD>true if the pubsub service supports collection nodes.</DL></DD></DL><HR><A NAME="getRootCollectionNode()"><!-- --></A><H3>getRootCollectionNode</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/pubsub/CollectionNode.html" title="class in org.jivesoftware.openfire.pubsub">CollectionNode</A> <B>getRootCollectionNode</B>()</PRE><DL><DD>Returns the <A HREF="../../../../org/jivesoftware/openfire/pubsub/CollectionNode.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>CollectionNode</CODE></A> that acts as the root node of the entire node hierarchy. The returned node does not have a node identifier. If collection nodes is not supported then return <tt>null</tt>.<P><DD><DL><DT><B>Returns:</B><DD>the CollectionNode that acts as the root node of the entire node hierarchy or <tt>null</tt> if collection nodes is not supported.</DL></DD></DL><HR><A NAME="getNode(java.lang.String)"><!-- --></A><H3>getNode</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A> <B>getNode</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> nodeID)</PRE><DL><DD>Returns the <A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub"><CODE>Node</CODE></A> that matches the specified node ID or <tt>null</tt> if none was found.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>nodeID</CODE> - the ID that uniquely identifies the node in the pubsub service.<DT><B>Returns:</B><DD>the Node that matches the specified node ID or <tt>null</tt> if none was found.</DL></DD></DL><HR><A NAME="getNodes()"><!-- --></A><H3>getNodes</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A>> <B>getNodes</B>()</PRE><DL><DD>Retuns the collection of nodes hosted by the pubsub service. The collection does not support modifications.<P><DD><DL><DT><B>Returns:</B><DD>the collection of nodes hosted by the pubsub service.</DL></DD></DL><HR><A NAME="addNode(org.jivesoftware.openfire.pubsub.Node)"><!-- --></A><H3>addNode</H3><PRE>void <B>addNode</B>(<A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A> node)</PRE><DL><DD>Adds an already persistent node to the service.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>node</CODE> - the persistent node to add to the service.</DL></DD></DL><HR><A NAME="removeNode(java.lang.String)"><!-- --></A><H3>removeNode</H3><PRE>void <B>removeNode</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> nodeID)</PRE><DL><DD>Removes the specified node from the service. Most probaly the node was deleted from the database as well.<p> A future version may support unloading of inactive nodes even though they may still exist in the database.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>nodeID</CODE> - the ID that uniquely identifies the node in the pubsub service.</DL></DD></DL><HR><A NAME="broadcast(org.jivesoftware.openfire.pubsub.Node, org.xmpp.packet.Message, java.util.Collection)"><!-- --></A><H3>broadcast</H3><PRE>void <B>broadcast</B>(<A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A> node, <A HREF="../../../../org/xmpp/packet/Message.html" title="class in org.xmpp.packet">Message</A> message, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>> jids)</PRE><DL><DD>Broadcasts the specified Message containing an event notification to a list of subscribers to the specified node. Each message being sent has to have a unique ID value so that the service can properly track any notification-related errors that may occur.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>node</CODE> - the node that triggered the event notification.<DD><CODE>message</CODE> - the message containing the event notification.<DD><CODE>jids</CODE> - the list of entities to get the event notification.</DL></DD></DL><HR><A NAME="send(org.xmpp.packet.Packet)"><!-- --></A><H3>send</H3><PRE>void <B>send</B>(<A HREF="../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> packet)</PRE><DL><DD>Sends the specified packet.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the packet to send.</DL></DD></DL><HR><A NAME="sendNotification(org.jivesoftware.openfire.pubsub.Node, org.xmpp.packet.Message, org.xmpp.packet.JID)"><!-- --></A><H3>sendNotification</H3><PRE>void <B>sendNotification</B>(<A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A> node, <A HREF="../../../../org/xmpp/packet/Message.html" title="class in org.xmpp.packet">Message</A> message, <A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> jid)</PRE><DL><DD>Sends the specified Message containing an event notification to a specific subscriber of the specified node. The message being sent has to have a unique ID value so that the service can properly track any notification-related errors that may occur.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>node</CODE> - the node that triggered the event notification.<DD><CODE>message</CODE> - the message containing the event notification.<DD><CODE>jid</CODE> - the entity to get the event notification.</DL></DD></DL><HR><A NAME="getDefaultNodeConfiguration(boolean)"><!-- --></A><H3>getDefaultNodeConfiguration</H3><PRE><A HREF="../../../../org/jivesoftware/openfire/pubsub/DefaultNodeConfiguration.html" title="class in org.jivesoftware.openfire.pubsub">DefaultNodeConfiguration</A> <B>getDefaultNodeConfiguration</B>(boolean leafType)</PRE><DL><DD>Returns the default node configuration for the specified node type or <tt>null</tt> if the specified node type is not supported by the service.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>leafType</CODE> - true when requesting default configuration of leaf nodes<DT><B>Returns:</B><DD>the default node configuration for the specified node type or <tt>null</tt> if the specified node type is not supported by the service.</DL></DD></DL><HR><A NAME="getShowPresences(org.xmpp.packet.JID)"><!-- --></A><H3>getShowPresences</H3><PRE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A><<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>> <B>getShowPresences</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> subscriber)</PRE><DL><DD>Returns the show values of the last know presence of all connected resources of the specified subscriber. When the subscriber JID is a bare JID then the answered collection will have many entries one for each connected resource. Moreover, if the user is offline then an empty collectin is returned. Available show status is represented by a <tt>online</tt> value. The rest of the possible show values as defined in RFC 3921.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>subscriber</CODE> - the JID of the subscriber. This is not the JID of the affiliate.<DT><B>Returns:</B><DD>an empty collection when offline. Otherwise, a collection with the show value of each connected resource.</DL></DD></DL><HR><A NAME="presenceSubscriptionRequired(org.jivesoftware.openfire.pubsub.Node, org.xmpp.packet.JID)"><!-- --></A><H3>presenceSubscriptionRequired</H3><PRE>void <B>presenceSubscriptionRequired</B>(<A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A> node, <A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> user)</PRE><DL><DD>Requests the pubsub service to subscribe to the presence of the user. If the service has already subscribed to the user's presence then do nothing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>node</CODE> - the node that originated the subscription request.<DD><CODE>user</CODE> - the JID of the affiliate to subscribe to his presence.</DL></DD></DL><HR><A NAME="presenceSubscriptionNotRequired(org.jivesoftware.openfire.pubsub.Node, org.xmpp.packet.JID)"><!-- --></A><H3>presenceSubscriptionNotRequired</H3><PRE>void <B>presenceSubscriptionNotRequired</B>(<A HREF="../../../../org/jivesoftware/openfire/pubsub/Node.html" title="class in org.jivesoftware.openfire.pubsub">Node</A> node,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -