Class DiscoItem
- java.lang.Object
-
- org.jivesoftware.openfire.disco.DiscoItem
-
- All Implemented Interfaces:
org.xmpp.resultsetmanagement.Result
- Direct Known Subclasses:
DiscoServerItem
public class DiscoItem extends Object implements org.xmpp.resultsetmanagement.Result
An item is associated with an XMPP Entity, usually thought of a children of the parent entity and normally are addressable as a JID.An item associated with an entity may not be addressable as a JID. In order to handle such items, Service Discovery uses an optional 'node' attribute that supplements the 'jid' attribute.
- Author:
- Gaston Dombiak
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getAction()
Returns the action (i.e.org.dom4j.Element
getElement()
Returns a dom4j element that represents this DiscoItem object.org.xmpp.packet.JID
getJID()
Returns the entity's ID.String
getName()
Returns the entity's name.String
getNode()
Returns the node attribute that supplements the 'jid' attribute.String
getUID()
int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
DiscoItem
public DiscoItem(org.dom4j.Element element)
-
DiscoItem
public DiscoItem(org.xmpp.packet.JID jid, String name, String node, String action)
Creates a new DiscoItem instance.- Parameters:
jid
- specifies the Jabber ID of the item "owner" or location (required).name
- specifies a natural-language name for the item (can be null).node
- specifies the particular node associated with the JID of the item "owner" or location (can be null).action
- specifies the action to be taken for the item.- Throws:
IllegalArgumentException
- If a required parameter was null, or if the supplied 'action' parameter has another value than 'null', "update" or "remove".
-
-
Method Detail
-
getJID
public org.xmpp.packet.JID getJID()
Returns the entity's ID.
- Returns:
- the entity's ID.
-
getNode
public String getNode()
Returns the node attribute that supplements the 'jid' attribute. A node is merely something that is associated with a JID and for which the JID can provide information.
Node attributes SHOULD be used only when trying to provide or query information which is not directly addressable.
- Returns:
- the node attribute that supplements the 'jid' attribute
-
getName
public String getName()
Returns the entity's name. The entity's name specifies in natural-language the name for the item.
- Returns:
- the entity's name.
-
getAction
public String getAction()
Returns the action (i.e. update or remove) that indicates what must be done with this item or null if none. An "update" action requests the server to create or update the item. Whilst a "remove" action requests to remove the item.
- Returns:
- the action (i.e. update or remove) that indicates what must be done with this item or null if none.
-
getElement
public org.dom4j.Element getElement()
Returns a dom4j element that represents this DiscoItem object.- Returns:
- element representing this object.
-
getUID
public String getUID()
- Specified by:
getUID
in interfaceorg.xmpp.resultsetmanagement.Result
-
-