|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.echomine.jabber.msg.ServiceItem
public class ServiceItem
Supporting class to work with the Service Discovery protocol. This class contains one instance of a service item as present in a service items result. This class also supports the action "view" (on top of "update" and "remove") to support Flexible Offline Message Retrieval.
ServiceItemsIQMessage
Field Summary | |
---|---|
static java.lang.String |
ACTION_REMOVE
|
static java.lang.String |
ACTION_UPDATE
|
static java.lang.String |
ACTION_VIEW
|
Constructor Summary | |
---|---|
ServiceItem(Element serviceElem)
constructor that will parse the incoming element for the element data |
|
ServiceItem(JID jid)
construct a service item with the required attributes set |
|
ServiceItem(JID jid,
java.lang.String name)
constructs a service item based on the following attributes |
|
ServiceItem(JID jid,
java.lang.String name,
java.lang.String node)
constructs a service item based on the following attributes |
Method Summary | |
---|---|
Element |
encode()
|
java.lang.String |
getAction()
|
JID |
getJID()
|
java.lang.String |
getName()
|
java.lang.String |
getNode()
|
void |
parse(Element serviceElem)
parses the element for all the data. |
void |
setAction(java.lang.String action)
sets the action type of this item. |
void |
setJID(JID jid)
sets the JID of the item |
void |
setName(java.lang.String name)
sets the name/description of the item |
void |
setNode(java.lang.String node)
sets the node name associated with the item Node attributes SHOULD be used only when trying to provide or query information which is not directly addressable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ACTION_VIEW
public static final java.lang.String ACTION_UPDATE
public static final java.lang.String ACTION_REMOVE
Constructor Detail |
---|
public ServiceItem(JID jid)
public ServiceItem(JID jid, java.lang.String name)
jid
- the jid of the itemname
- the optional name/description of the item, may be nullpublic ServiceItem(JID jid, java.lang.String name, java.lang.String node)
jid
- the jid of the itemname
- the optional name/description of the item, may be nullnode
- the optional node name of the item, may be nullpublic ServiceItem(Element serviceElem) throws ParseException
ParseException
Method Detail |
---|
public JID getJID()
public void setJID(JID jid)
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getNode()
public void setNode(java.lang.String node)
public java.lang.String getAction()
public void setAction(java.lang.String action)
public void parse(Element serviceElem) throws ParseException
serviceElem
- the element that contains the service item
ParseException
public Element encode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |