1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-27 00:32:07 +01:00

Adds class and methods comments

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2267 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2004-04-01 21:44:21 +00:00 committed by gdombiak
parent 003d73fd7d
commit c45843e8ab

View file

@ -57,7 +57,14 @@ import java.util.Date;
import org.jivesoftware.smack.packet.PacketExtension; import org.jivesoftware.smack.packet.PacketExtension;
/** /**
* Represents... * Represents extended presence information whose sole purpose is to signal the ability of
* the occupant to speak the MUC protocol when joining a room. If the room requires a password
* then the MUCInitialPresence should include one.<p>
*
* The amount of discussion history provided on entering a room (perhaps because the
* user is on a low-bandwidth connection or is using a small-footprint client) could be managed by
* setting a configured History instance to the MUCInitialPresence instance.
* @see MUCInitialPresence#setHistory(MUCInitialPresence.History).
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
@ -89,33 +96,51 @@ public class MUCInitialPresence implements PacketExtension {
} }
/** /**
* @return * Returns the history that manages the amount of discussion history provided on
* entering a room.
*
* @return the history that manages the amount of discussion history provided on
* entering a room.
*/ */
public History getHistory() { public History getHistory() {
return history; return history;
} }
/** /**
* @return * Returns the password to use when the room requires a password.
*
* @return the password to use when the room requires a password.
*/ */
public String getPassword() { public String getPassword() {
return password; return password;
} }
/** /**
* @param history * Sets the History that manages the amount of discussion history provided on
* entering a room.
*
* @param history that manages the amount of discussion history provided on
* entering a room.
*/ */
public void setHistory(History history) { public void setHistory(History history) {
this.history = history; this.history = history;
} }
/** /**
* @param string * Sets the password to use when the room requires a password.
*
* @param password the password to use when the room requires a password.
*/ */
public void setPassword(String string) { public void setPassword(String password) {
password = string; this.password = password;
} }
/**
* The History class controls the number of characters or messages to receive
* when entering a room.
*
* @author Gaston Dombiak
*/
public static class History { public static class History {
private int maxChars = -1; private int maxChars = -1;
@ -124,59 +149,84 @@ public class MUCInitialPresence implements PacketExtension {
private Date since; private Date since;
/** /**
* @return * Returns the total number of characters to receive in the history.
*
* @return total number of characters to receive in the history.
*/ */
public int getMaxChars() { public int getMaxChars() {
return maxChars; return maxChars;
} }
/** /**
* @return * Returns the total number of messages to receive in the history.
*
* @return the total number of messages to receive in the history.
*/ */
public int getMaxStanzas() { public int getMaxStanzas() {
return maxStanzas; return maxStanzas;
} }
/** /**
* @return * Returns the number of seconds to use to filter the messages received during that time.
* In other words, only the messages received in the last "X" seconds will be included in
* the history.
*
* @return the number of seconds to use to filter the messages received during that time.
*/ */
public int getSeconds() { public int getSeconds() {
return seconds; return seconds;
} }
/** /**
* @return * Returns the since date to use to filter the messages received during that time.
* In other words, only the messages received since the datetime specified will be
* included in the history.
*
* @return the since date to use to filter the messages received during that time.
*/ */
public Date getSince() { public Date getSince() {
return since; return since;
} }
/** /**
* @param i * Sets the total number of characters to receive in the history.
*
* @param maxChars the total number of characters to receive in the history.
*/ */
public void setMaxChars(int i) { public void setMaxChars(int maxChars) {
maxChars = i; this.maxChars = maxChars;
} }
/** /**
* @param i * Sets the total number of messages to receive in the history.
*
* @param maxStanzas the total number of messages to receive in the history.
*/ */
public void setMaxStanzas(int i) { public void setMaxStanzas(int maxStanzas) {
maxStanzas = i; this.maxStanzas = maxStanzas;
} }
/** /**
* @param i * Sets the number of seconds to use to filter the messages received during that time.
* In other words, only the messages received in the last "X" seconds will be included in
* the history.
*
* @param seconds he number of seconds to use to filter the messages received during
* that time.
*/ */
public void setSeconds(int i) { public void setSeconds(int seconds) {
seconds = i; this.seconds = seconds;
} }
/** /**
* @param date * Sets the since date to use to filter the messages received during that time.
* In other words, only the messages received since the datetime specified will be
* included in the history.
*
* @param since the since date to use to filter the messages received during that time.
*/ */
public void setSince(Date date) { public void setSince(Date since) {
since = date; this.since = since;
} }
public String toXML() { public String toXML() {