1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

Rename 'Packet' class to 'Stanza'

Smack still uses the term 'Packet' in some places. This is just the
first step towards using correct XMPP terms in Smack.
This commit is contained in:
Florian Schmaus 2015-02-05 11:17:27 +01:00
parent 9fc26f1d83
commit 4698805a34
142 changed files with 595 additions and 572 deletions

View file

@ -25,7 +25,7 @@ import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.debugger.SmackDebugger;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.util.ObservableReader;
import org.jivesoftware.smack.util.ObservableWriter;
@ -206,7 +206,7 @@ public class EnhancedDebugger implements SmackDebugger {
packetReaderListener = new PacketListener() {
SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss:SS aaa");
public void processPacket(final Packet packet) {
public void processPacket(final Stanza packet) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
addReadPacketToTable(dateFormatter, packet);
@ -221,7 +221,7 @@ public class EnhancedDebugger implements SmackDebugger {
packetWriterListener = new PacketListener() {
SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss:SS aaa");
public void processPacket(final Packet packet) {
public void processPacket(final Stanza packet) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
addSentPacketToTable(dateFormatter, packet);
@ -791,7 +791,7 @@ public class EnhancedDebugger implements SmackDebugger {
* @param dateFormatter the SimpleDateFormat to use to format Dates
* @param packet the read packet to add to the table
*/
private void addReadPacketToTable(final SimpleDateFormat dateFormatter, final Packet packet) {
private void addReadPacketToTable(final SimpleDateFormat dateFormatter, final Stanza packet) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
String messageType;
@ -836,7 +836,7 @@ public class EnhancedDebugger implements SmackDebugger {
packetReceivedIcon,
packetTypeIcon,
messageType,
packet.getPacketID(),
packet.getStanzaId(),
type,
"",
from});
@ -852,7 +852,7 @@ public class EnhancedDebugger implements SmackDebugger {
* @param dateFormatter the SimpleDateFormat to use to format Dates
* @param packet the sent packet to add to the table
*/
private void addSentPacketToTable(final SimpleDateFormat dateFormatter, final Packet packet) {
private void addSentPacketToTable(final SimpleDateFormat dateFormatter, final Stanza packet) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
String messageType;
@ -897,7 +897,7 @@ public class EnhancedDebugger implements SmackDebugger {
packetSentIcon,
packetTypeIcon,
messageType,
packet.getPacketID(),
packet.getStanzaId(),
type,
to,
""});
@ -970,7 +970,7 @@ public class EnhancedDebugger implements SmackDebugger {
* The whole text to send must be passed to the constructor. This implies that the client of
* this class is responsible for sending a valid text to the constructor.
*/
private class AdHocPacket extends Packet {
private class AdHocPacket extends Stanza {
private String text;

View file

@ -43,7 +43,7 @@ import javax.swing.JTextArea;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.debugger.SmackDebugger;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.ObservableReader;
import org.jivesoftware.smack.util.ObservableWriter;
import org.jivesoftware.smack.util.ReaderListener;
@ -262,7 +262,7 @@ public class LiteDebugger implements SmackDebugger {
// the GUI. This is what we call "interpreted" packet data, since it's the packet
// data as Smack sees it and not as it's coming in as raw XML.
listener = new PacketListener() {
public void processPacket(Packet packet) {
public void processPacket(Stanza packet) {
interpretedText1.append(packet.toXML().toString());
interpretedText2.append(packet.toXML().toString());
interpretedText1.append(NEWLINE);