From 15cb5768ae68e28473dcdde817479cd566300bf9 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Thu, 16 Jan 2003 15:41:25 +0000 Subject: [PATCH] Improved comments. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1792 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/packet/IQ.java | 35 ++++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/source/org/jivesoftware/smack/packet/IQ.java b/source/org/jivesoftware/smack/packet/IQ.java index 40f671404..69057bdf0 100644 --- a/source/org/jivesoftware/smack/packet/IQ.java +++ b/source/org/jivesoftware/smack/packet/IQ.java @@ -53,7 +53,11 @@ package org.jivesoftware.smack.packet; /** - * A generic IQ packet. + * A generic IQ (Info/Query) packet. IQ packets are used to get and set information + * on the server, including authentication, roster operations, and creating + * accounts. Each IQ packet has a specific type that indicates what type of action + * is being taken: "get", "set", "result", or "error". The actual data of an IQ + * packet is normally enclosed in the query section with a specific namespace. * * @author Matt Tucker */ @@ -61,10 +65,20 @@ public class IQ extends Packet { private Type type = Type.GET; + /** + * Returns the type of the IQ packet. + * + * @return the type of the IQ packet. + */ public Type getType() { return type; } + /** + * Sets the type of the IQ packet. + * + * @param type the type of the IQ packet. + */ public void setType(Type type) { this.type = type; } @@ -107,10 +121,12 @@ public class IQ extends Packet { } /** - * Implementations of this method should return the XML of the query section of - * an IQ packet if that section should exist, or null otherwise. This lets - * the majority of IQ XML writing be generic, with each sub-class providing just the - * packet specific XML. + * Returns the "query" XML section of the IQ packet, or null if there + * isn't one.

+ * + * Generally, extensions of this class should override this method. This lets + * the majority of IQ XML writing be generic, with each sub-class providing just + * the packet-specific XML. * * @return the query section of the IQ XML. */ @@ -119,7 +135,7 @@ public class IQ extends Packet { } /** - * A class to represent the type of the IQ packet. Valid types are: + * A class to represent the type of the IQ packet. The types are: * *