1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Apply builder pattern to ConnectionConfiguration

Introducing a clean split between the constant connection configuration
parameters, which are now all in ConnectionConfiguration and the dynamic
connection state (e.g. hostAddresses) which are now in
AbstractXMPPConnection.

Also removed all arguments of login() since the username, password,
resource and callback handler need now to be configured via
ConnectionConfiguration.

Also remove documentation/extensions/messageevents.md, as it's already
in documentation/legacy
This commit is contained in:
Florian Schmaus 2014-11-09 18:30:16 +01:00
parent 69f387b344
commit c81cd34561
24 changed files with 760 additions and 708 deletions

View file

@ -45,7 +45,7 @@ public class PacketWriterTest {
@SuppressWarnings("javadoc")
@Test
public void shouldBlockAndUnblockTest() throws InterruptedException, BrokenBarrierException, NotConnectedException {
XMPPTCPConnection connection = new XMPPTCPConnection("foobar.com");
XMPPTCPConnection connection = new XMPPTCPConnection("user", "pass", "example.org");
final PacketWriter pw = connection.new PacketWriter();
connection.packetWriter = pw;
connection.packetReader = connection.new PacketReader();

View file

@ -38,7 +38,7 @@ public class RosterOfflineTest {
@Before
public void setup() throws XMPPException, SmackException {
this.connection = new XMPPTCPConnection("localhost");
this.connection = new XMPPTCPConnection("user", "pass", "example.org");
assertFalse(connection.isConnected());
roster = connection.getRoster();