public class Iq extends Packet
| Modifier and Type | Field and Description |
|---|---|
static String |
ELEM_NAME
Field description
|
static String[] |
IQ_BIND_PATH
Field description
|
static String[] |
IQ_BIND_RESOURCE_PATH
Field description
|
static String[] |
IQ_CHAT_PATH
Field description
|
static String[] |
IQ_COMMAND_PATH
Field description
|
static String[] |
IQ_ERROR_PATH
Field description
|
static String[] |
IQ_PUBSUB_PATH
Field description
|
static String[] |
IQ_QUERY_PATH
Field description
|
static String |
QUERY_NAME
Field description
|
CLIENT_XMLNS, elem, FROM_ATT, FULL_DEBUG, ID_ATT, PERM_ATT, PRIORITY_ATT, TO_ATT, TYPE_ATT, XMLNS_ATT| Constructor and Description |
|---|
Iq(tigase.xml.Element elem)
Constructs ...
|
Iq(tigase.xml.Element elem,
tigase.xmpp.JID stanzaFrom,
tigase.xmpp.JID stanzaTo)
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
Packet |
commandResult(Command.DataType cmd_type)
Method description
|
static Packet |
commandResultForm(Iq packet)
Method description
|
static Packet |
commandResultResult(Iq packet)
Method description
|
static Iq |
createRosterPacket(String iq_type,
String iq_id,
tigase.xmpp.JID from,
tigase.xmpp.JID to,
tigase.xmpp.JID item_jid,
String item_name,
String[] item_groups,
String subscription,
String item_type)
Method description creates a new
Packet instance or Iq
instance more specificly with a roster entry content. |
Command |
getCommand()
The method always returns NULL.
|
protected String[] |
getElNameErrorPath()
A convenience method to provide XML path as
String[] to error element. |
String |
getIQChildName()
Method description
|
String |
getIQXMLNS()
Method description
|
String |
getStrCommand()
Method description
|
boolean |
isCommand()
The method checks whether the stanza enclosed by this
Packet
instance is an ad-hoc command. |
boolean |
isServiceDisco()
A convenience method which checks whether the enclosed stanza is a service
discovery query.
|
copyElementOnly, debug, elemToString, elemToStringSecure, errorResult, getAttribute, getAttribute, getAttribute, getAttributeStaticStr, getAttributeStaticStr, getElemCData, getElemCData, getElemCData, getElemCDataStaticStr, getElemChildren, getElemChildren, getElemChildrenStaticStr, getElement, getElemFrom, getElemName, getElemTo, getErrorCondition, getFrom, getPacketFrom, getPacketTo, getPermissions, getPriority, getProcessorsIds, getStanzaFrom, getStanzaId, getStanzaTo, getTo, getType, getXMLNS, initVars, initVars, isElement, isRouted, isXMLNS, isXMLNS, isXMLNSStaticStr, okResult, okResult, packetInstance, packetInstance, packetInstance, packRouted, processedBy, setPacketFrom, setPacketTo, setPermissions, setPriority, setXMLNS, swapElemFromTo, swapElemFromTo, swapFromTo, swapFromTo, swapStanzaFromTo, swapStanzaFromTo, toString, toString, toStringFull, toStringSecure, unpackRouted, wasProcessed, wasProcessedBypublic static final String ELEM_NAME
public static final String QUERY_NAME
public static final String[] IQ_QUERY_PATH
public static final String[] IQ_PUBSUB_PATH
public static final String[] IQ_ERROR_PATH
public static final String[] IQ_COMMAND_PATH
public static final String[] IQ_CHAT_PATH
public static final String[] IQ_BIND_RESOURCE_PATH
public static final String[] IQ_BIND_PATH
public Iq(tigase.xml.Element elem) throws tigase.util.TigaseStringprepException
elem - tigase.util.TigaseStringprepExceptionpublic Iq(tigase.xml.Element elem, tigase.xmpp.JID stanzaFrom, tigase.xmpp.JID stanzaTo)
elem - stanzaFrom - stanzaTo - public static Packet commandResultForm(Iq packet) throws tigase.util.TigaseStringprepException
packet - tigase.util.TigaseStringprepExceptionpublic static Packet commandResultResult(Iq packet) throws tigase.util.TigaseStringprepException
packet - tigase.util.TigaseStringprepExceptionpublic static Iq createRosterPacket(String iq_type, String iq_id, tigase.xmpp.JID from, tigase.xmpp.JID to, tigase.xmpp.JID item_jid, String item_name, String[] item_groups, String subscription, String item_type)
Packet instance or Iq
instance more specificly with a roster entry content.
TODO: Remove dependency on RosterAbstract class, possibly move the method again
to more proper location but it needs to be accessible from all parts of the application.iq_type - is a String value with the stanza type: 'set', 'get',
'result'.iq_id - is a String value with the stanza unique id.from - is a JID instance with the packet source address.to - is a JID instance with the packet destination address.item_jid - is a JID instance with the roster item JID, note in most
cases the jid should not have a resource part, but this method does not cut it off. This
is because there are cases when we want to have a resource part in the roster item.item_name - is a String vakue with the roster item name.item_groups - is a String[] array with all groups the item belongs
to.subscription - is a String instance with the item subscription state.item_type - is a String of the user item type. This is
null in most cases as this is not part of the XMPP RFC. Some deployments
needs some extra information about the roster item type though.Packet instance or Iq instance more
specificly with a roster entry content.public Packet commandResult(Command.DataType cmd_type)
cmd_type - public Command getCommand()
PacketIq class
where it returns a command identifier if the iq stanza represents an
ad-hoc command. It is provided here is a convenience so the developer does not
have to cast the packet to IQ before retrieving the command id.getCommand in class Packetpublic String getIQChildName()
public String getIQXMLNS()
protected String[] getElNameErrorPath()
PacketString[] to error element.
This method should be override by all classes extending this class.getElNameErrorPath in class Packetpublic String getStrCommand()
public boolean isCommand()
PacketPacket
instance is an ad-hoc command.
This is a generic method which in fact always returns false. It
is overwritten in the Iq class where the real checking is
performed. This class has been provided as a convenience method to perform
the check without a need for casting the Packet instance to
the Iq class.public boolean isServiceDisco()
Packetfalse. It
is overwritten in the Iq class where the real checking is
performed. This class has been provided as a convenience method to perform
the check without a need for casting the Packet instance to
the Iq class.isServiceDisco in class Packetboolean value true if the stanza is
a a service discovery query and false otherwise.Copyright © 2015 "Tigase, Inc.". All rights reserved.