Author: j16sdiz
Date: 2008-08-14 08:40:29 +0000 (Thu, 14 Aug 2008)
New Revision: 21836
Modified:
trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
trunk/freenet/src/freenet/clients/http/SymlinkerToadlet.java
trunk/freenet/src/freenet/config/ConfigCallback.java
trunk/freenet/src/freenet/crypt/SSL.java
trunk/freenet/src/freenet/node/ConfigurablePersister.java
trunk/freenet/src/freenet/node/LoggingConfigHandler.java
trunk/freenet/src/freenet/node/Node.java
trunk/freenet/src/freenet/node/NodeClientCore.java
trunk/freenet/src/freenet/node/NodeCryptoConfig.java
trunk/freenet/src/freenet/node/NodeIPDetector.java
trunk/freenet/src/freenet/node/NodeStats.java
trunk/freenet/src/freenet/node/TestnetHandler.java
trunk/freenet/src/freenet/node/TextModeClientInterfaceServer.java
trunk/freenet/src/freenet/node/fcp/FCPServer.java
trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
trunk/freenet/src/freenet/oldplugins/plugin/PluginManager.java
trunk/freenet/src/freenet/pluginmanager/PluginManager.java
Log:
reverts r21833
Modified: trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-08-14 07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-08-14 08:40:29 UTC (rev 21836)
@@ -76,10 +76,6 @@
public void setPossibleValues(String[] val) {
throw new NullPointerException("Should not happen!");
}
-
- public boolean isReadOnly() {
- return false;
- }
}
/**
Modified: trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
2008-08-14 07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/clients/http/SimpleToadletServer.java
2008-08-14 08:40:29 UTC (rev 21836)
@@ -93,9 +93,6 @@
ssl = val;
throw new InvalidConfigValueException("Cannot change
SSL on the fly, please restart freenet");
}
- public boolean isReadOnly() {
- return true;
- }
}
class FProxyPassthruMaxSize implements IntCallback {
@@ -108,9 +105,6 @@
if(val == get()) return;
FProxyToadlet.MAX_LENGTH = val;
}
- public boolean isReadOnly() {
- return false;
- }
}
class FProxyPortCallback implements IntCallback {
@@ -124,9 +118,6 @@
throw new
InvalidConfigValueException(L10n.getString("cannotChangePortOnTheFly"));
// FIXME
}
- public boolean isReadOnly() {
- return true;
- }
}
class FProxyBindtoCallback implements StringCallback {
@@ -148,9 +139,6 @@
}
}
}
- public boolean isReadOnly() {
- return false;
- }
}
class FProxyAllowedHostsCallback implements StringCallback {
@@ -164,10 +152,7 @@
networkInterface.setAllowedHosts(allowedHosts);
}
}
-
- public boolean isReadOnly() {
- return false;
- }
+
}
class FProxyCSSNameCallback implements StringCallback,
EnumerableOptionCallback {
@@ -190,9 +175,6 @@
public String[] getPossibleValues() {
return
StringArray.toArray(pageMaker.getThemes().toArray());
}
- public boolean isReadOnly() {
- return false;
- }
}
class FProxyCSSOverrideCallback implements StringCallback {
@@ -215,9 +197,6 @@
}
pageMaker.setOverride(cssOverride);
}
- public boolean isReadOnly() {
- return false;
- }
}
class FProxyEnabledCallback implements BooleanCallback {
@@ -243,9 +222,6 @@
myThread.setDaemon(true);
myThread.start();
}
- public boolean isReadOnly() {
- return false;
- }
}
private boolean haveCalledFProxy = false;
@@ -281,9 +257,6 @@
if(val == get()) return;
ts.enableAdvancedMode(val);
}
- public boolean isReadOnly() {
- return false;
- }
}
private static class FProxyJavascriptEnabledCallback implements
BooleanCallback {
@@ -302,9 +275,6 @@
if(val == get()) return;
ts.enableFProxyJavascript(val);
}
- public boolean isReadOnly() {
- return false;
- }
}
public synchronized void setCore(NodeClientCore core) {
@@ -390,10 +360,6 @@
if(value ==
SimpleToadletServer.isPanicButtonToBeShown) return;
else
SimpleToadletServer.isPanicButtonToBeShown = value;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
// This is OFF BY DEFAULT because for example firefox has a
limit of 2 persistent
@@ -415,10 +381,6 @@
enablePersistentConnections = val;
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
enablePersistentConnections =
fproxyConfig.getBoolean("enablePersistentConnections");
@@ -442,10 +404,6 @@
enableInlinePrefetch =
val;
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
enableInlinePrefetch =
fproxyConfig.getBoolean("enableInlinePrefetch");
@@ -465,9 +423,6 @@
public void set(String val) throws
InvalidConfigValueException {
allowedFullAccess.setAllowedHosts(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
allowedFullAccess = new
AllowedHosts(fproxyConfig.getString("allowedHostsFullAccess"));
@@ -479,9 +434,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
doRobots = val;
}
- public boolean isReadOnly() {
- return false;
- }
});
doRobots = fproxyConfig.getBoolean("doRobots");
Modified: trunk/freenet/src/freenet/clients/http/SymlinkerToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/SymlinkerToadlet.java
2008-08-14 07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/clients/http/SymlinkerToadlet.java
2008-08-14 08:40:29 UTC (rev 21836)
@@ -35,10 +35,6 @@
// FIXME
throw new InvalidConfigValueException("Cannot
set the plugins that's loaded.");
}
-
- public boolean isReadOnly() {
- return true;
- }
});
String fns[] = tslconfig.getStringArr("symlinks");
Modified: trunk/freenet/src/freenet/config/ConfigCallback.java
===================================================================
--- trunk/freenet/src/freenet/config/ConfigCallback.java 2008-08-14
07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/config/ConfigCallback.java 2008-08-14
08:40:29 UTC (rev 21836)
@@ -4,5 +4,5 @@
package freenet.config;
public interface ConfigCallback {
- boolean isReadOnly();
+ /** Nothing usefull here */
}
Modified: trunk/freenet/src/freenet/crypt/SSL.java
===================================================================
--- trunk/freenet/src/freenet/crypt/SSL.java 2008-08-14 07:52:53 UTC (rev
21835)
+++ trunk/freenet/src/freenet/crypt/SSL.java 2008-08-14 08:40:29 UTC (rev
21836)
@@ -15,6 +15,7 @@
*/
package freenet.crypt;
+import com.sleepycat.je.utilint.NotImplementedYetException;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -23,18 +24,16 @@
import java.security.Key;
import java.security.KeyStore;
import java.security.cert.Certificate;
-
import javax.net.ServerSocketFactory;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
-import com.sleepycat.je.utilint.NotImplementedYetException;
-
import freenet.config.InvalidConfigValueException;
import freenet.config.SubConfig;
import freenet.support.Logger;
import freenet.support.api.BooleanCallback;
import freenet.support.api.StringCallback;
+
import freenet.support.io.Closer;
public class SSL {
@@ -88,10 +87,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
sslConfig.register("sslKeyStore", "datastore/certs",
configItemOrder++, true, true, "SSL.keyStore", "SSL.keyStoreLong",
@@ -114,10 +109,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
sslConfig.register("sslKeyStorePass", "freenet",
configItemOrder++, true, true, "SSL.keyStorePass", "SSL.keyStorePassLong",
@@ -140,10 +131,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
sslConfig.register("sslKeyPass", "freenet", configItemOrder++,
true, true, "SSL.keyPass", "SSL.keyPassLong",
@@ -169,10 +156,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
sslConfig.register("sslVersion", "SSLv3", configItemOrder++,
true, true, "SSL.version", "SSL.versionLong",
@@ -195,10 +178,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
enable = sslConfig.getBoolean("sslEnable");
Modified: trunk/freenet/src/freenet/node/ConfigurablePersister.java
===================================================================
--- trunk/freenet/src/freenet/node/ConfigurablePersister.java 2008-08-14
07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/node/ConfigurablePersister.java 2008-08-14
08:40:29 UTC (rev 21836)
@@ -22,9 +22,7 @@
public void set(String val) throws
InvalidConfigValueException {
setThrottles(val);
}
- public boolean isReadOnly() {
- return false;
- }
+
});
String throttleFile = nodeConfig.getString(optionName);
Modified: trunk/freenet/src/freenet/node/LoggingConfigHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/LoggingConfigHandler.java 2008-08-14
07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/node/LoggingConfigHandler.java 2008-08-14
08:40:29 UTC (rev 21836)
@@ -45,10 +45,6 @@
public void setPossibleValues(String[] val) {
throw new NullPointerException("Should not happen!");
- }
-
- public boolean isReadOnly() {
- return false;
}
}
@@ -78,10 +74,6 @@
} else
enableLogger();
}
-
- public boolean isReadOnly() {
- return false;
- }
});
boolean loggingEnabled = loggingConfig.getBoolean("enabled");
@@ -107,10 +99,6 @@
new
Deleter(logDir).start();
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
logDir = new File(config.getString("dirname"));
@@ -132,9 +120,6 @@
fileLoggerHook.setMaxOldLogsSize(val);
}
}
- public boolean isReadOnly() {
- return false;
- }
});
maxZippedLogsSize = config.getLong("maxZippedLogsSize");
@@ -165,10 +150,6 @@
throw new
InvalidConfigValueException(e.getMessage());
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
@@ -191,10 +172,6 @@
}
logRotateInterval = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
logRotateInterval = config.getString("interval");
@@ -212,9 +189,6 @@
if(fileLoggerHook != null)
fileLoggerHook.setMaxListBytes(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
maxCachedLogBytes = config.getLong("maxCachedBytes");
@@ -232,9 +206,6 @@
if(fileLoggerHook != null)
fileLoggerHook.setMaxListLength(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
maxCachedLogLines = config.getInt("maxCachedLines");
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2008-08-14 07:52:53 UTC (rev
21835)
+++ trunk/freenet/src/freenet/node/Node.java 2008-08-14 08:40:29 UTC (rev
21836)
@@ -3,7 +3,6 @@
import java.io.BufferedReader;
import java.io.File;
-import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -119,6 +118,7 @@
import freenet.support.io.FileUtil;
import freenet.support.io.NativeThread;
import freenet.support.transport.ip.HostnameSyntaxException;
+import java.io.FileFilter;
/**
* @author amphibian
@@ -168,9 +168,6 @@
// has been unregistered ... see #1595
get();
}
- public boolean isReadOnly() {
- return false;
- }
}
private class StoreTypeCallback implements StringCallback,
EnumerableOptionCallback {
@@ -193,10 +190,7 @@
public void setPossibleValues(String[] val) {
throw new UnsupportedOperationException();
}
-
- public boolean isReadOnly() {
- return true;
- }
+
}
private static class L10nCallback implements StringCallback,
EnumerableOptionCallback {
@@ -224,9 +218,6 @@
result[i] = L10n.AVAILABLE_LANGUAGES[i][1];
return result;
}
- public boolean isReadOnly() {
- return false;
- }
}
/** Stats */
@@ -763,9 +754,6 @@
// Don't translate the below as
very few users will use it.
throw new
InvalidConfigValueException("Moving node directory on the fly not supported at
present");
}
- public boolean isReadOnly() {
- return true;
- }
});
nodeDir = new File(nodeConfig.getString("nodeDir"));
@@ -828,10 +816,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
disableProbabilisticHTLs = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
@@ -847,10 +831,6 @@
if(maxHTL < 0) throw new
InvalidConfigValueException("Impossible max HTL");
maxHTL = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
maxHTL = nodeConfig.getShort("maxHTL");
@@ -878,10 +858,7 @@
public void set(boolean val) throws
InvalidConfigValueException {
throw new InvalidConfigValueException("Cannot
change on the fly");
}
-
- public boolean isReadOnly() {
- return true;
- }
+
});
enableARKs = nodeConfig.getBoolean("enableARKs");
@@ -894,10 +871,7 @@
public void set(boolean val) throws
InvalidConfigValueException {
throw new InvalidConfigValueException("Cannot
change on the fly");
}
-
- public boolean isReadOnly() {
- return true;
- }
+
});
enablePerNodeFailureTables =
nodeConfig.getBoolean("enablePerNodeFailureTables");
@@ -910,10 +884,7 @@
public void set(boolean val) throws
InvalidConfigValueException {
throw new InvalidConfigValueException("Cannot
change on the fly");
}
-
- public boolean isReadOnly() {
- return true;
- }
+
});
enableULPRDataPropagation =
nodeConfig.getBoolean("enableULPRDataPropagation");
@@ -926,10 +897,7 @@
public void set(boolean val) throws
InvalidConfigValueException {
throw new InvalidConfigValueException("Cannot
change on the fly");
}
-
- public boolean isReadOnly() {
- return true;
- }
+
});
enableSwapping = nodeConfig.getBoolean("enableSwapping");
@@ -942,10 +910,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
publishOurPeersLocation = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
publishOurPeersLocation =
nodeConfig.getBoolean("publishOurPeersLocation");
@@ -958,10 +922,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
routeAccordingToOurPeersLocation = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
routeAccordingToOurPeersLocation =
nodeConfig.getBoolean("routeAccordingToOurPeersLocation");
@@ -973,10 +933,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
enableSwapQueueing = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
enableSwapQueueing =
nodeConfig.getBoolean("enableSwapQueueing");
@@ -989,10 +945,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
enablePacketCoalescing = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
enablePacketCoalescing =
nodeConfig.getBoolean("enablePacketCoalescing");
@@ -1046,10 +998,6 @@
outputThrottle.changeNanosAndBucketSize((1000L * 1000L * 1000L) / obwLimit,
obwLimit/2);
nodeStats.setOutputLimit(obwLimit);
}
-
- public boolean isReadOnly() {
- return false;
- }
});
int obwLimit = nodeConfig.getInt("outputBandwidthLimit");
@@ -1080,10 +1028,6 @@
}
nodeStats.setInputLimit(ibwLimit);
}
-
- public boolean isReadOnly() {
- return false;
- }
});
int ibwLimit = nodeConfig.getInt("inputBandwidthLimit");
@@ -1103,10 +1047,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
throttleLocalData = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
@@ -1212,10 +1152,6 @@
isAllowedToConnectToSeednodes =
val;
}
}
-
- public boolean isReadOnly() {
- return opennet != null;
- }
});
isAllowedToConnectToSeednodes =
opennetConfig.getBoolean("connectToSeednodes");
@@ -1246,9 +1182,6 @@
else o.stop(true);
ipDetector.ipDetectorManager.notifyPortChange(getPublicInterfacePorts());
}
- public boolean isReadOnly() {
- return false;
- }
});
boolean opennetEnabled = opennetConfig.getBoolean("enabled");
@@ -1262,9 +1195,6 @@
if(inputMaxOpennetPeers > 20)
throw new
InvalidConfigValueException(l10n("maxOpennetPeersMustBeTwentyOrLess"));
maxOpennetPeers =
inputMaxOpennetPeers;
}
- public boolean isReadOnly() {
- return false;
- }
}
);
@@ -1292,10 +1222,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
acceptSeedConnections = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
@@ -1317,9 +1243,6 @@
passOpennetRefsThroughDarknet = val;
}
}
- public boolean isReadOnly() {
- return false;
- }
});
@@ -1336,9 +1259,6 @@
// FIXME
throw new
InvalidConfigValueException("Moving extra peer data directory on the fly not
supported at present");
}
- public boolean isReadOnly() {
- return true;
- }
});
extraPeerDataDir = new
File(nodeConfig.getString("extraPeerDataDir"));
if(!((extraPeerDataDir.exists() &&
extraPeerDataDir.isDirectory()) || (extraPeerDataDir.mkdir()))) {
@@ -1367,9 +1287,6 @@
storeForceBigShrinks =
val;
}
}
- public boolean isReadOnly() {
- return false;
- }
});
@@ -1417,9 +1334,6 @@
nodeStats.avgStoreLocation.changeMaxReports((int)maxStoreKeys);
nodeStats.avgCacheLocation.changeMaxReports((int)maxCacheKeys);
}
- public boolean isReadOnly() {
- return false;
- }
});
maxTotalDatastoreSize = nodeConfig.getLong("storeSize");
@@ -1440,9 +1354,6 @@
// FIXME
throw new
InvalidConfigValueException("Moving datastore on the fly not supported at
present");
}
- public boolean isReadOnly() {
- return true;
- }
});
final String suffix = "-" + getDarknetPortNumber();
@@ -1616,10 +1527,6 @@
}
databaseMaxMemory = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
@@ -1732,10 +1639,7 @@
public void set(boolean val) throws
InvalidConfigValueException {
disableHangCheckers = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
+
});
disableHangCheckers =
nodeConfig.getBoolean("disableHangCheckers");
Modified: trunk/freenet/src/freenet/node/NodeClientCore.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeClientCore.java 2008-08-14 07:52:53 UTC
(rev 21835)
+++ trunk/freenet/src/freenet/node/NodeClientCore.java 2008-08-14 08:40:29 UTC
(rev 21836)
@@ -154,9 +154,6 @@
// FIXME
throw new
InvalidConfigValueException(l10n("movingTempDirOnTheFlyNotSupported"));
}
- public boolean isReadOnly() {
- return true;
- }
});
tempDir = new File(nodeConfig.getString("tempDir"));
@@ -183,9 +180,6 @@
if((val == get()) ||
(persistentTempBucketFactory == null)) return;
persistentTempBucketFactory.setEncryption(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
nodeConfig.register("persistentTempDir", new File(nodeDir,
"persistent-temp-" + portNumber).toString(), sortOrder++, true, false,
"NodeClientCore.persistentTempDir", "NodeClientCore.persistentTempDirLong",
@@ -201,9 +195,6 @@
// FIXME
throw new
InvalidConfigValueException("Moving persistent temp directory on the fly not
supported at present");
}
- public boolean isReadOnly() {
- return true;
- }
});
try {
persistentTempBucketFactory = new
PersistentTempBucketFactory(new
File(nodeConfig.getString("persistentTempDir")), "freenet-temp-", random,
node.fastWeakRandom, nodeConfig.getBoolean("encryptPersistentTempBuckets"));
@@ -222,9 +213,6 @@
if((val == get()) || (tempBucketFactory ==
null)) return;
tempBucketFactory.setMaxRAMBucketSize(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
nodeConfig.register("RAMBucketPoolSize", "10MiB", sortOrder++,
true, false, "NodeClientCore.ramBucketPoolSize",
"NodeClientCore.ramBucketPoolSizeLong", new LongCallback() {
@@ -236,9 +224,6 @@
if((val == get()) || (tempBucketFactory ==
null)) return;
tempBucketFactory.setMaxRamUsed(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
nodeConfig.register("encryptTempBuckets", true, sortOrder++,
true, false, "NodeClientCore.encryptTempBuckets",
"NodeClientCore.encryptTempBucketsLong", new BooleanCallback() {
@@ -251,9 +236,6 @@
if((val == get()) || (tempBucketFactory ==
null)) return;
tempBucketFactory.setEncryption(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
tempBucketFactory = new
TempBucketFactory(tempFilenameGenerator,
nodeConfig.getLong("maxRAMBucketSize"),
nodeConfig.getLong("RAMBucketPoolSize"), random, node.fastWeakRandom,
nodeConfig.getBoolean("encryptTempBuckets"));
@@ -274,9 +256,6 @@
throw new
InvalidConfigValueException(l10n("couldNotFindOrCreateDir"));
downloadDir = new File(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
String val = nodeConfig.getString("downloadsDir");
@@ -306,9 +285,6 @@
public void set(String[] val) throws
InvalidConfigValueException {
setDownloadAllowedDirs(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
setDownloadAllowedDirs(nodeConfig.getStringArr("downloadAllowedDirs"));
@@ -330,9 +306,6 @@
public void set(String[] val) throws
InvalidConfigValueException {
setUploadAllowedDirs(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
setUploadAllowedDirs(nodeConfig.getStringArr("uploadAllowedDirs"));
@@ -358,9 +331,6 @@
lazyResume = val;
}
}
- public boolean isReadOnly() {
- return false;
- }
});
lazyResume = nodeConfig.getBoolean("lazyResume");
@@ -377,9 +347,6 @@
throw new
InvalidConfigValueException(l10n("maxUSKFetchersMustBeGreaterThanZero"));
maxBackgroundUSKFetchers = uskFetch;
}
- public boolean isReadOnly() {
- return false;
- }
});
maxBackgroundUSKFetchers =
nodeConfig.getInt("maxBackgroundUSKFetchers");
Modified: trunk/freenet/src/freenet/node/NodeCryptoConfig.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeCryptoConfig.java 2008-08-14
07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/node/NodeCryptoConfig.java 2008-08-14
08:40:29 UTC (rev 21836)
@@ -73,9 +73,6 @@
portNumber = val;
}
}
- public boolean isReadOnly() {
- return true;
- }
});
try{
@@ -115,9 +112,6 @@
}
crypto.onSetDropProbability(val);
}
- public boolean isReadOnly() {
- return false;
- }
});
dropProbability = config.getInt("testingDropPacketsEvery");
@@ -136,10 +130,6 @@
oneConnectionPerAddress
= val;
}
}
-
- public boolean isReadOnly() {
- return false;
- }
});
oneConnectionPerAddress =
config.getBoolean("oneConnectionPerIP");
@@ -158,9 +148,6 @@
alwaysAllowLocalAddresses = val;
}
}
- public boolean isReadOnly() {
- return false;
- }
});
alwaysAllowLocalAddresses =
config.getBoolean("alwaysAllowLocalAddresses");
@@ -173,9 +160,6 @@
public void set(boolean val) throws
InvalidConfigValueException {
assumeNATed = val;
}
- public boolean isReadOnly() {
- return false;
- }
});
assumeNATed = config.getBoolean("assumeNATed");
}
@@ -215,9 +199,6 @@
// FIXME why not? Can't we use
freenet.io.NetworkInterface like everywhere else, just adapt it for UDP?
throw new InvalidConfigValueException("Cannot be
updated on the fly");
}
- public boolean isReadOnly() {
- return true;
- }
}
public synchronized FreenetInetAddress getBindTo() {
Modified: trunk/freenet/src/freenet/node/NodeIPDetector.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeIPDetector.java 2008-08-14 07:52:53 UTC
(rev 21835)
+++ trunk/freenet/src/freenet/node/NodeIPDetector.java 2008-08-14 08:40:29 UTC
(rev 21836)
@@ -373,10 +373,7 @@
}
redetectAddress();
}
-
- public boolean isReadOnly() {
- return false;
- }
+
});
hasValidAddressOverride = true;
@@ -423,10 +420,7 @@
}
redetectAddress();
}
-
- public boolean isReadOnly() {
- return false;
- }
+
});
String ipHintString = nodeConfig.getString("tempIPAddressHint");
@@ -454,10 +448,7 @@
lastIPAddress = null;
ipDetector.clearCached();
}
-
- public boolean isReadOnly() {
- return false;
- }
+
});
includeLocalAddressesInNoderefs =
nodeConfig.getBoolean("includeLocalAddressesInNoderefs");
Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java 2008-08-14 07:52:53 UTC
(rev 21835)
+++ trunk/freenet/src/freenet/node/NodeStats.java 2008-08-14 08:40:29 UTC
(rev 21836)
@@ -221,10 +221,6 @@
throw new
InvalidConfigValueException(l10n("valueTooLow"));
threadLimit = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
threadLimit = statsConfig.getInt("threadLimit");
@@ -239,10 +235,6 @@
Logger.normal(this, "Changing
aggressiveGCModificator to "+val);
aggressiveGCModificator = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
});
aggressiveGCModificator = statsConfig.getInt("aggressiveGC");
@@ -261,10 +253,6 @@
else
myMemoryChecker.terminate();
}
-
- public boolean isReadOnly() {
- return false;
- }
});
if(statsConfig.getBoolean("memoryChecker"))
myMemoryChecker.start();
@@ -282,9 +270,7 @@
ignoreLocalVsRemoteBandwidthLiability =
val;
}
}
- public boolean isReadOnly() {
- return false;
- }
+
});
persister = new ConfigurablePersister(this, statsConfig,
"nodeThrottleFile", "node-throttle.dat", sortOrder++, true, false,
Modified: trunk/freenet/src/freenet/node/TestnetHandler.java
===================================================================
--- trunk/freenet/src/freenet/node/TestnetHandler.java 2008-08-14 07:52:53 UTC
(rev 21835)
+++ trunk/freenet/src/freenet/node/TestnetHandler.java 2008-08-14 08:40:29 UTC
(rev 21836)
@@ -224,10 +224,7 @@
if(node.testnetEnabled == val) return;
throw new
InvalidConfigValueException(L10n.getString("TestnetHandler.cannotEnableDisableOnTheFly"));
}
-
- public boolean isReadOnly() {
- return true;
- }
+
}
@@ -246,9 +243,6 @@
if(val == get()) return;
node.testnetHandler.rebind(val);
}
- public boolean isReadOnly() {
- return false;
- }
}
Modified: trunk/freenet/src/freenet/node/TextModeClientInterfaceServer.java
===================================================================
--- trunk/freenet/src/freenet/node/TextModeClientInterfaceServer.java
2008-08-14 07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/node/TextModeClientInterfaceServer.java
2008-08-14 08:40:29 UTC (rev 21836)
@@ -120,9 +120,6 @@
// FIXME implement - see bug #122
throw new InvalidConfigValueException("Cannot be updated on the
fly");
}
- public boolean isReadOnly() {
- return true;
- }
}
static class TMCISSLCallback implements BooleanCallback {
@@ -139,9 +136,6 @@
ssl = val;
throw new InvalidConfigValueException("Cannot change SSL on the
fly, please restart freenet");
}
- public boolean isReadOnly() {
- return true;
- }
}
static class TMCIDirectEnabledCallback implements BooleanCallback {
@@ -161,9 +155,6 @@
// FIXME implement - see bug #122
throw new InvalidConfigValueException("Cannot be updated on the
fly");
}
- public boolean isReadOnly() {
- return true;
- }
}
static class TMCIBindtoCallback implements StringCallback {
@@ -190,9 +181,6 @@
throw new InvalidConfigValueException("could not change
bind to!");
}
}
- public boolean isReadOnly() {
- return false;
- }
}
static class TMCIAllowedHostsCallback implements StringCallback {
@@ -220,10 +208,7 @@
throw new
InvalidConfigValueException("Setting allowedHosts for TMCI (console) server
when TMCI is disabled");
}
}
-
- public boolean isReadOnly() {
- return false;
- }
+
}
static class TCMIPortNumberCallback implements IntCallback{
@@ -246,10 +231,6 @@
if(val == get()) return;
core.getTextModeClientInterface().setPort(val);
}
-
- public boolean isReadOnly() {
- return false;
- }
}
/**
Modified: trunk/freenet/src/freenet/node/fcp/FCPServer.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/FCPServer.java 2008-08-14 07:52:53 UTC
(rev 21835)
+++ trunk/freenet/src/freenet/node/fcp/FCPServer.java 2008-08-14 08:40:29 UTC
(rev 21836)
@@ -16,7 +16,6 @@
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.Vector;
import java.util.WeakHashMap;
import java.util.zip.GZIPInputStream;
@@ -50,6 +49,7 @@
import freenet.support.api.StringCallback;
import freenet.support.io.Closer;
import freenet.support.io.FileUtil;
+import java.util.LinkedList;
/**
* FCP server process.
@@ -210,10 +210,6 @@
throw new InvalidConfigValueException("Cannot
change FCP port number on the fly");
}
}
-
- public boolean isReadOnly() {
- return true;
- }
}
static class FCPEnabledCallback implements BooleanCallback{
@@ -233,10 +229,6 @@
throw new
InvalidConfigValueException(l10n("cannotStartOrStopOnTheFly"));
}
}
-
- public boolean isReadOnly() {
- return true;
- }
}
static class FCPSSLCallback implements BooleanCallback{
@@ -253,10 +245,6 @@
ssl = val;
throw new InvalidConfigValueException("Cannot change
SSL on the fly, please restart freenet");
}
-
- public boolean isReadOnly() {
- return true;
- }
}
// FIXME: Consider moving everything except enabled into constructor
@@ -287,10 +275,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
}
static class FCPAllowedHostsCallback implements StringCallback {
@@ -313,13 +297,11 @@
node.getFCPServer().networkInterface.setAllowedHosts(val);
}
}
-
- public boolean isReadOnly() {
- return false;
- }
+
}
static class FCPAllowedHostsFullAccessCallback implements
StringCallback {
+
private final NodeClientCore node;
public FCPAllowedHostsFullAccessCallback(NodeClientCore node) {
@@ -335,10 +317,6 @@
node.getFCPServer().allowedHostsFullAccess.setAllowedHosts(val);
}
}
-
- public boolean isReadOnly() {
- return false;
- }
}
@@ -354,10 +332,6 @@
if(server.persistentDownloadsEnabled() != set)
server.setPersistentDownloadsEnabled(set);
}
-
- public boolean isReadOnly() {
- return false;
- }
}
@@ -374,10 +348,6 @@
if(f.equals(server.persistentDownloadsFile)) return;
server.setPersistentDownloadsFile(f);
}
-
- public boolean isReadOnly() {
- return false;
- }
}
static class PersistentDownloadsIntervalCallback implements
LongCallback {
@@ -397,10 +367,6 @@
}
}
}
-
- public boolean isReadOnly() {
- return false;
- }
}
static class AssumeDDADownloadIsAllowedCallback implements
BooleanCallback{
@@ -414,10 +380,6 @@
if(val == get()) return;
server.assumeDownloadDDAIsAllowed = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
}
static class AssumeDDAUploadIsAllowedCallback implements
BooleanCallback{
@@ -431,10 +393,6 @@
if(val == get()) return;
server.assumeUploadDDAIsAllowed = val;
}
-
- public boolean isReadOnly() {
- return false;
- }
}
Modified: trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
===================================================================
--- trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
2008-08-14 07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/node/updater/NodeUpdateManager.java
2008-08-14 08:40:29 UTC (rev 21836)
@@ -813,9 +813,6 @@
public void set(boolean val) throws InvalidConfigValueException
{
enable(val);
}
- public boolean isReadOnly() {
- return false;
- }
}
class AutoUpdateAllowedCallback implements BooleanCallback {
@@ -827,9 +824,6 @@
public void set(boolean val) throws InvalidConfigValueException
{
setAutoUpdateAllowed(val);
}
- public boolean isReadOnly() {
- return false;
- }
}
class UpdateURICallback implements StringCallback {
@@ -854,9 +848,6 @@
setURI(isExt, uri);
}
- public boolean isReadOnly() {
- return false;
- }
}
public class UpdateRevocationURICallback implements StringCallback {
@@ -874,10 +865,7 @@
}
setRevocationURI(uri);
}
-
- public boolean isReadOnly() {
- return false;
- }
+
}
/** Called when a peer indicates in its UOMAnnounce that it has fetched
the revocation key
Modified: trunk/freenet/src/freenet/oldplugins/plugin/PluginManager.java
===================================================================
--- trunk/freenet/src/freenet/oldplugins/plugin/PluginManager.java
2008-08-14 07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/oldplugins/plugin/PluginManager.java
2008-08-14 08:40:29 UTC (rev 21836)
@@ -84,10 +84,6 @@
public void set(String[] val) throws
InvalidConfigValueException {
throw new
InvalidConfigValueException(L10n.getString("PluginManager.cannotSetOnceLoaded"));
};
-
- public boolean isReadOnly() {
- return true;
- }
});
String[] loadedPluginNames =
config.getStringArr("loadedPlugins");
Modified: trunk/freenet/src/freenet/pluginmanager/PluginManager.java
===================================================================
--- trunk/freenet/src/freenet/pluginmanager/PluginManager.java 2008-08-14
07:52:53 UTC (rev 21835)
+++ trunk/freenet/src/freenet/pluginmanager/PluginManager.java 2008-08-14
08:40:29 UTC (rev 21836)
@@ -127,10 +127,6 @@
// FIXME
throw new
InvalidConfigValueException(L10n.getString("PluginManager.cannotSetOnceLoaded"));
}
-
- public boolean isReadOnly() {
- return true;
- }
});
String fns[] = pmconfig.getStringArr("loadplugin");