mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-07 13:41:08 +01:00
Move duplicate sendPacket() code into XMPPConnection
This commit is contained in:
parent
c3f9ec4f94
commit
6197f6200f
5 changed files with 26 additions and 48 deletions
|
|
@ -185,19 +185,11 @@ public class DummyConnection extends XMPPConnection {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void sendPacket(Packet packet) {
|
||||
if (!isConnected()) {
|
||||
throw new IllegalStateException("Not connected to server.");
|
||||
}
|
||||
if (packet == null) {
|
||||
throw new NullPointerException("Packet is null.");
|
||||
}
|
||||
firePacketInterceptors(packet);
|
||||
void sendPacketInternal(Packet packet) {
|
||||
if (DEBUG_ENABLED) {
|
||||
System.out.println("[SEND]: " + packet.toXML());
|
||||
}
|
||||
queue.add(packet);
|
||||
firePacketSendingListeners(packet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue