forked from I2P_Developers/i2p.i2p
* NamingServices
- Move default reverseLookup to base class - Deprecate unused services
This commit is contained in:
@ -432,12 +432,14 @@ public class I2PAppContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated unused */
|
||||||
public PetNameDB petnameDb() {
|
public PetNameDB petnameDb() {
|
||||||
if (!_petnameDbInitialized)
|
if (!_petnameDbInitialized)
|
||||||
initializePetnameDb();
|
initializePetnameDb();
|
||||||
return _petnameDb;
|
return _petnameDb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated unused */
|
||||||
private void initializePetnameDb() {
|
private void initializePetnameDb() {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
if (_petnameDb == null) {
|
if (_petnameDb == null) {
|
||||||
|
@ -7,6 +7,9 @@ import net.i2p.I2PAppContext;
|
|||||||
import net.i2p.data.Address;
|
import net.i2p.data.Address;
|
||||||
import net.i2p.util.Log;
|
import net.i2p.util.Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated unused
|
||||||
|
*/
|
||||||
public abstract class AddressDB {
|
public abstract class AddressDB {
|
||||||
|
|
||||||
private final static Log _log = new Log(NamingService.class);
|
private final static Log _log = new Log(NamingService.class);
|
||||||
|
@ -6,6 +6,9 @@ import net.i2p.I2PAppContext;
|
|||||||
import net.i2p.data.Address;
|
import net.i2p.data.Address;
|
||||||
import net.i2p.data.Destination;
|
import net.i2p.data.Destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated unused
|
||||||
|
*/
|
||||||
public class AddressDBNamingService extends NamingService {
|
public class AddressDBNamingService extends NamingService {
|
||||||
|
|
||||||
private AddressDB _addressdb;
|
private AddressDB _addressdb;
|
||||||
|
@ -5,6 +5,9 @@ import java.util.Collection;
|
|||||||
import net.i2p.I2PAppContext;
|
import net.i2p.I2PAppContext;
|
||||||
import net.i2p.data.Address;
|
import net.i2p.data.Address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated unused
|
||||||
|
*/
|
||||||
public class DummyAddressDB extends AddressDB {
|
public class DummyAddressDB extends AddressDB {
|
||||||
|
|
||||||
public DummyAddressDB(I2PAppContext context) {
|
public DummyAddressDB(I2PAppContext context) {
|
||||||
|
@ -27,9 +27,4 @@ class DummyNamingService extends NamingService {
|
|||||||
public Destination lookup(String hostname) {
|
public Destination lookup(String hostname) {
|
||||||
return lookupBase64(hostname);
|
return lookupBase64(hostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String reverseLookup(Destination dest) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -136,9 +136,4 @@ public class EepGetNamingService extends NamingService {
|
|||||||
_log.error("Caught from: " + url + hostname);
|
_log.error("Caught from: " + url + hostname);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String reverseLookup(Destination dest) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -126,9 +126,4 @@ public class ExecNamingService extends NamingService {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String reverseLookup(Destination dest) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ import net.i2p.data.DataFormatException;
|
|||||||
import net.i2p.data.DataHelper;
|
import net.i2p.data.DataHelper;
|
||||||
import net.i2p.util.Log;
|
import net.i2p.util.Log;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated unused
|
||||||
|
*/
|
||||||
public class FilesystemAddressDB extends AddressDB {
|
public class FilesystemAddressDB extends AddressDB {
|
||||||
|
|
||||||
public final static String PROP_ADDRESS_DIR = "i2p.addressdir";
|
public final static String PROP_ADDRESS_DIR = "i2p.addressdir";
|
||||||
|
@ -138,6 +138,7 @@ public class HostsTxtNamingService extends NamingService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @deprecated unused */
|
||||||
@Override
|
@Override
|
||||||
public String reverseLookup(Hash h) {
|
public String reverseLookup(Hash h) {
|
||||||
List filenames = getFilenames();
|
List filenames = getFilenames();
|
||||||
|
@ -61,7 +61,9 @@ public abstract class NamingService {
|
|||||||
* if none is known. It is safe for subclasses to always return
|
* if none is known. It is safe for subclasses to always return
|
||||||
* <code>null</code> if no reverse lookup is possible.
|
* <code>null</code> if no reverse lookup is possible.
|
||||||
*/
|
*/
|
||||||
public abstract String reverseLookup(Destination dest);
|
public String reverseLookup(Destination dest) { return null; };
|
||||||
|
|
||||||
|
/** @deprecated unused */
|
||||||
public String reverseLookup(Hash h) { return null; };
|
public String reverseLookup(Hash h) { return null; };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -7,7 +7,7 @@ import java.util.StringTokenizer;
|
|||||||
import net.i2p.data.DataHelper;
|
import net.i2p.data.DataHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* deprecated unused but can be instantiated through I2PAppContext
|
||||||
*/
|
*/
|
||||||
public class PetName {
|
public class PetName {
|
||||||
private String _name;
|
private String _name;
|
||||||
|
@ -19,7 +19,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* deprecated unused but can be instantiated through I2PAppContext
|
||||||
*/
|
*/
|
||||||
public class PetNameDB {
|
public class PetNameDB {
|
||||||
/** name (String) to PetName mapping */
|
/** name (String) to PetName mapping */
|
||||||
|
@ -5,6 +5,9 @@ import java.io.IOException;
|
|||||||
import net.i2p.I2PAppContext;
|
import net.i2p.I2PAppContext;
|
||||||
import net.i2p.data.Destination;
|
import net.i2p.data.Destination;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated unused
|
||||||
|
*/
|
||||||
public class PetNameNamingService extends NamingService {
|
public class PetNameNamingService extends NamingService {
|
||||||
|
|
||||||
private PetNameDB _petnameDb;
|
private PetNameDB _petnameDb;
|
||||||
|
Reference in New Issue
Block a user