mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
merged branch improve_bytestreams in trunk
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11821 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
ef74695a1b
commit
8b54f34153
74 changed files with 11866 additions and 1902 deletions
|
@ -50,6 +50,9 @@ public final class SmackConfiguration {
|
|||
private static int keepAliveInterval = 30000;
|
||||
private static Vector<String> defaultMechs = new Vector<String>();
|
||||
|
||||
private static boolean localSocks5ProxyEnabled = true;
|
||||
private static int localSocks5ProxyPort = 7777;
|
||||
|
||||
private SmackConfiguration() {
|
||||
}
|
||||
|
||||
|
@ -90,6 +93,12 @@ public final class SmackConfiguration {
|
|||
}
|
||||
else if (parser.getName().equals("mechName")) {
|
||||
defaultMechs.add(parser.nextText());
|
||||
} else if (parser.getName().equals("localSocks5ProxyEnabled")) {
|
||||
localSocks5ProxyEnabled = Boolean.parseBoolean(parser
|
||||
.nextText());
|
||||
} else if (parser.getName().equals("localSocks5ProxyPort")) {
|
||||
localSocks5ProxyPort = parseIntProperty(parser,
|
||||
localSocks5ProxyPort);
|
||||
}
|
||||
}
|
||||
eventType = parser.next();
|
||||
|
@ -230,6 +239,43 @@ public final class SmackConfiguration {
|
|||
return defaultMechs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the local Socks5 proxy should be started. Default is true.
|
||||
*
|
||||
* @return if the local Socks5 proxy should be started
|
||||
*/
|
||||
public static boolean isLocalSocks5ProxyEnabled() {
|
||||
return localSocks5ProxyEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if the local Socks5 proxy should be started. Default is true.
|
||||
*
|
||||
* @param localSocks5ProxyEnabled if the local Socks5 proxy should be started
|
||||
*/
|
||||
public static void setLocalSocks5ProxyEnabled(boolean localSocks5ProxyEnabled) {
|
||||
SmackConfiguration.localSocks5ProxyEnabled = localSocks5ProxyEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the port of the local Socks5 proxy. Default is 7777.
|
||||
*
|
||||
* @return the port of the local Socks5 proxy
|
||||
*/
|
||||
public static int getLocalSocks5ProxyPort() {
|
||||
return localSocks5ProxyPort;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the port of the local Socks5 proxy. Default is 7777. If you set the port to a negative
|
||||
* value Smack tries the absolute value and all following until it finds an open port.
|
||||
*
|
||||
* @param localSocks5ProxyPort the port of the local Socks5 proxy to set
|
||||
*/
|
||||
public static void setLocalSocks5ProxyPort(int localSocks5ProxyPort) {
|
||||
SmackConfiguration.localSocks5ProxyPort = localSocks5ProxyPort;
|
||||
}
|
||||
|
||||
private static void parseClassToLoad(XmlPullParser parser) throws Exception {
|
||||
String className = parser.nextText();
|
||||
// Attempt to load the class so that the class can get initialized
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue