mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 18:29:45 +02:00
Introduce SmackConfiguration.SMACK_URL(_STRING)
This commit is contained in:
parent
f3b856c80b
commit
df5899e72b
4 changed files with 21 additions and 3 deletions
|
@ -17,6 +17,8 @@
|
|||
|
||||
package org.jivesoftware.smack;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -50,6 +52,18 @@ import org.jivesoftware.smack.util.Objects;
|
|||
*/
|
||||
public final class SmackConfiguration {
|
||||
|
||||
public static final String SMACK_URL_STRING = "https://igniterealtime.org/projects/smack";
|
||||
|
||||
public static final URL SMACK_URL;
|
||||
|
||||
static {
|
||||
try {
|
||||
SMACK_URL = new URL(SMACK_URL_STRING);
|
||||
} catch (MalformedURLException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static int defaultPacketReplyTimeout = 5000;
|
||||
private static int packetCollectorSize = 5000;
|
||||
|
||||
|
|
|
@ -16,10 +16,12 @@
|
|||
*/
|
||||
package org.jivesoftware.smack.packet;
|
||||
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
|
||||
public class TestIQ extends SimpleIQ {
|
||||
|
||||
public TestIQ() {
|
||||
this("https://igniterealtime.org/projects/smack", "test-iq");
|
||||
this(SmackConfiguration.SMACK_URL_STRING, "test-iq");
|
||||
}
|
||||
|
||||
public TestIQ(String element, String namespace) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue