tigase.server
Class Iq

java.lang.Object
  extended by tigase.server.Packet
      extended by tigase.server.Iq

public class Iq
extends Packet

Created: Dec 31, 2009 8:43:21 PM

Version:
$Rev: 2065 $
Author:
Artur Hefczyc

Field Summary
static String ELEM_NAME
          Field description
 
Fields inherited from class tigase.server.Packet
elem, FULL_DEBUG
 
Constructor Summary
Iq(tigase.xml.Element elem)
          Constructs ...
Iq(tigase.xml.Element elem, tigase.xmpp.JID stanzaFrom, tigase.xmpp.JID stanzaTo)
          Constructs ...
 
Method Summary
 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()
          Method description
 String getIQChildName()
          Method description
 String getIQXMLNS()
          Method description
 String getStrCommand()
          Method description
 boolean isCommand()
          Method description
 boolean isServiceDisco()
          Method description
 
Methods inherited from class tigase.server.Packet
copyElementOnly, debug, errorResult, getAttribute, getAttribute, getElemCData, getElemCData, getElemChildren, getElement, getElemFrom, getElemName, getElemTo, getErrorCondition, getFrom, getPacketFrom, getPacketTo, getPermissions, getPriority, getProcessorsIds, getStanzaFrom, getStanzaId, getStanzaTo, getTo, getType, getXMLNS, initVars, initVars, isElement, isRouted, isXMLNS, okResult, okResult, packetInstance, packetInstance, packetInstance, packRouted, processedBy, setPacketFrom, setPacketTo, setPermissions, setPriority, swapElemFromTo, swapElemFromTo, swapFromTo, swapFromTo, swapStanzaFromTo, swapStanzaFromTo, toString, toString, toStringSecure, unpackRouted, wasProcessed, wasProcessedBy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ELEM_NAME

public static final String ELEM_NAME
Field description

See Also:
Constant Field Values
Constructor Detail

Iq

public Iq(tigase.xml.Element elem)
   throws tigase.util.TigaseStringprepException
Constructs ...

Parameters:
elem -
Throws:
tigase.util.TigaseStringprepException

Iq

public Iq(tigase.xml.Element elem,
          tigase.xmpp.JID stanzaFrom,
          tigase.xmpp.JID stanzaTo)
Constructs ...

Parameters:
elem -
stanzaFrom -
stanzaTo -
Method Detail

commandResultForm

public static Packet commandResultForm(Iq packet)
                                throws tigase.util.TigaseStringprepException
Method description

Parameters:
packet -
Returns:
Throws:
tigase.util.TigaseStringprepException

commandResultResult

public static Packet commandResultResult(Iq packet)
                                  throws tigase.util.TigaseStringprepException
Method description

Parameters:
packet -
Returns:
Throws:
tigase.util.TigaseStringprepException

createRosterPacket

public 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. 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.

Parameters:
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.
Returns:
a new Packet instance or Iq instance more specificly with a roster entry content.

commandResult

public Packet commandResult(Command.DataType cmd_type)
Method description

Parameters:
cmd_type -
Returns:

getCommand

public Command getCommand()
Method description

Overrides:
getCommand in class Packet
Returns:

getIQChildName

public String getIQChildName()
Method description

Returns:

getIQXMLNS

public String getIQXMLNS()
Method description

Returns:

getStrCommand

public String getStrCommand()
Method description

Returns:

isCommand

public boolean isCommand()
Method description

Overrides:
isCommand in class Packet
Returns:

isServiceDisco

public boolean isServiceDisco()
Method description

Overrides:
isServiceDisco in class Packet
Returns:


Copyright © 2001-2006 Tigase Developers Team. All rights Reserved.