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

s/processPacket/processStanza/ s/PacketCollector/StanzaCollector/

This commit is contained in:
Florian Schmaus 2017-01-03 11:12:34 +01:00
parent 9328182912
commit 90a5e289f8
100 changed files with 406 additions and 406 deletions

View file

@ -89,7 +89,7 @@ req.setTo("juliet@capulet.com/balcony");
// send it
connection.sendIqWithResponseCallback(req, new PacketListener() {
public void processPacket(Stanza packet) {
public void processStanza(Stanza iq) {
HttpOverXmppResp resp = (HttpOverXmppResp) iq;
// check HTTP response code
if (resp.getStatusCode() == 200) {

View file

@ -143,8 +143,8 @@ XHTML bodies of any received message.
```
// Create a listener for the chat and display any XHTML content
PacketListener packetListener = new PacketListener() {
public void processPacket(Stanza packet) {
Message message = (Message) packet;
public void processStanza(Stanza stanza) {
Message message = (Message) stanza;
// Obtain the XHTML bodies of the message
List<CharSequence> bodies = XHTMLManager.getBodies(message);
if (bodies != null) {

View file

@ -29,13 +29,13 @@ PacketCollector myCollector = connection.createPacketCollector(filter);
// Normally, you'd do something with the collector, like wait for new packets.
// Next, create a packet listener. We use an anonymous inner class for brevity.
PacketListener myListener = new PacketListener() {
**public** **void** processPacket(Packet packet) {
// Do something with the incoming packet here._
StanzaListener myListener = new StanzaListener() {
**public** **void** processStanza(Stanza stanza) {
// Do something with the incoming stanza here._
}
};
// Register the listener._
connection.addPacketListener(myListener, filter);
connection.addStanzaListener(myListener, filter);
```
Standard Stanza Filters