1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 01:29: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

@ -180,7 +180,7 @@ public class DummyConnection extends AbstractXMPPConnection {
* @param packet the stanza(/packet) to process.
*/
public void processStanza(Stanza packet) {
invokePacketCollectorsAndNotifyRecvListeners(packet);
invokeStanzaCollectorsAndNotifyRecvListeners(packet);
}
/**

View file

@ -23,18 +23,18 @@ import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.packet.Stanza;
import org.junit.Test;
public class PacketCollectorTest
public class StanzaCollectorTest
{
@Test
public void verifyRollover() throws InterruptedException
{
TestPacketCollector collector = new TestPacketCollector(null, new OKEverything(), 5);
TestStanzaCollector collector = new TestStanzaCollector(null, new OKEverything(), 5);
for (int i=0; i<6; i++)
{
Stanza testPacket = new TestPacket(i);
collector.processPacket(testPacket);
collector.processStanza(testPacket);
}
// Assert that '0' has rolled off
@ -48,7 +48,7 @@ public class PacketCollectorTest
for (int i=10; i<15; i++)
{
Stanza testPacket = new TestPacket(i);
collector.processPacket(testPacket);
collector.processStanza(testPacket);
}
assertEquals("10", collector.nextResultBlockForever().getStanzaId());
@ -69,7 +69,7 @@ public class PacketCollectorTest
public void verifyThreadSafety()
{
int insertCount = 500;
final TestPacketCollector collector = new TestPacketCollector(null, new OKEverything(), insertCount);
final TestStanzaCollector collector = new TestStanzaCollector(null, new OKEverything(), insertCount);
Thread consumer1 = new Thread(new Runnable()
{
@ -158,7 +158,7 @@ public class PacketCollectorTest
for(int i=0; i<insertCount; i++)
{
collector.processPacket(new TestPacket(i));
collector.processStanza(new TestPacket(i));
}
try
@ -186,11 +186,11 @@ public class PacketCollectorTest
}
class TestPacketCollector extends PacketCollector
class TestStanzaCollector extends StanzaCollector
{
protected TestPacketCollector(XMPPConnection conection, StanzaFilter packetFilter, int size)
protected TestStanzaCollector(XMPPConnection conection, StanzaFilter packetFilter, int size)
{
super(conection, PacketCollector.newConfiguration().setStanzaFilter(packetFilter).setSize(size));
super(conection, StanzaCollector.newConfiguration().setStanzaFilter(packetFilter).setSize(size));
}
}

View file

@ -28,7 +28,7 @@ public class WaitForPacketListener implements StanzaListener {
private CountDownLatch latch = new CountDownLatch(1);
@Override
public void processPacket(Stanza packet) throws NotConnectedException {
public void processStanza(Stanza packet) throws NotConnectedException {
reportInvoked();
}