Package net.handle.hdllib
Class FilesystemConfiguration
- java.lang.Object
-
- net.handle.hdllib.Configuration
-
- net.handle.hdllib.FilesystemConfiguration
-
public class FilesystemConfiguration extends Configuration
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AUTO_UPDATE_ROOT_INFO
static java.lang.String
PREFERRED_GLOBAL_SERVICE_HANDLE
static java.lang.String
SITE_FILTER_KEYWORDS_ATT_NAME
-
Fields inherited from class net.handle.hdllib.Configuration
RM_GLOBAL, RM_WITH_CACHE
-
-
Constructor Summary
Constructors Constructor Description FilesystemConfiguration(java.io.File configDir)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
configureResolver(HandleResolver resolver)
static void
configureResolverUsingKeys(HandleResolver resolver, net.cnri.util.StreamTable configTable)
BootstrapHandles
getBootstrapHandles()
SiteInfo[]
getCacheSites()
java.io.File
getConfigDir()
static java.io.File
getDefaultConfigDir()
NamespaceInfo
getGlobalNamespace()
SiteInfo[]
getGlobalSites()
HandleValue[]
getGlobalValues()
java.util.Map<java.lang.String,java.lang.String>
getLocalAddressMap()
Gets the mapping of addresses to local addressesSiteInfo[]
getLocalSites(java.lang.String na)
java.lang.String
getPreferredGlobalServiceHandle()
int
getResolutionMethod()
java.util.List<java.security.PublicKey>
getRootKeys()
boolean
isAutoUpdateRootInfo()
java.net.InetAddress
mapLocalAddress(java.net.InetAddress addr)
If the given address appears in the local address map return the address to which it is mapped.void
persist()
save the default global values in the users' config directoryvoid
saveLocalAddressMap()
Saves the local address map to the appropriate configuration filevoid
setAutoUpdateRootInfo(boolean enabled)
void
setBootstrapHandles(BootstrapHandles bootstrapHandles)
void
setCacheSites(SiteInfo[] cacheSites)
void
setConfigDir(java.io.File newConfigDir)
void
setGlobalSites(SiteInfo[] globalSites)
void
setGlobalValues(HandleValue[] globalValues)
Deprecated.void
setGlobalValuesFile(java.io.File newGlobalValuesFile)
void
setLocalAddressMap(java.util.Map<java.lang.String,java.lang.String> localAddrMap)
Sets a map that converts IP addresses to alternate addresses.void
setLocalSites(java.lang.String na, SiteInfo[] sites)
void
setResolutionMethod(int resolutionMethod)
void
setRootKeys(java.util.List<java.security.PublicKey> rootKeys)
-
Methods inherited from class net.handle.hdllib.Configuration
addRootInfoListener, checkRootInfoUpToDate, defaultConfiguration, getLocalSites, isBootstrapHandlesOld, notifyRootInfoOutdated, removeRootInfoListener, setLocalSites, startAutoUpdate
-
-
-
-
Field Detail
-
AUTO_UPDATE_ROOT_INFO
public static final java.lang.String AUTO_UPDATE_ROOT_INFO
- See Also:
- Constant Field Values
-
PREFERRED_GLOBAL_SERVICE_HANDLE
public static final java.lang.String PREFERRED_GLOBAL_SERVICE_HANDLE
- See Also:
- Constant Field Values
-
SITE_FILTER_KEYWORDS_ATT_NAME
public static final java.lang.String SITE_FILTER_KEYWORDS_ATT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultConfigDir
public static java.io.File getDefaultConfigDir()
-
configureResolver
public void configureResolver(HandleResolver resolver)
- Overrides:
configureResolver
in classConfiguration
-
configureResolverUsingKeys
public static void configureResolverUsingKeys(HandleResolver resolver, net.cnri.util.StreamTable configTable)
-
setLocalSites
public void setLocalSites(java.lang.String na, SiteInfo[] sites)
- Overrides:
setLocalSites
in classConfiguration
-
setLocalAddressMap
public void setLocalAddressMap(java.util.Map<java.lang.String,java.lang.String> localAddrMap)
Sets a map that converts IP addresses to alternate addresses. This is used to map IP addresses that are viewable outside of firewalls to IP addresses that are accessibile from inside a firewall. This is needed for certain NAT firewall/routers. The localAddrMap parameter should map String representations.- Overrides:
setLocalAddressMap
in classConfiguration
-
saveLocalAddressMap
public void saveLocalAddressMap() throws java.io.IOException
Saves the local address map to the appropriate configuration file- Overrides:
saveLocalAddressMap
in classConfiguration
- Throws:
java.io.IOException
-
getLocalAddressMap
public java.util.Map<java.lang.String,java.lang.String> getLocalAddressMap()
Gets the mapping of addresses to local addresses- Overrides:
getLocalAddressMap
in classConfiguration
-
mapLocalAddress
public java.net.InetAddress mapLocalAddress(java.net.InetAddress addr)
If the given address appears in the local address map return the address to which it is mapped. Otherwise, return the given parameter.- Overrides:
mapLocalAddress
in classConfiguration
-
getLocalSites
public SiteInfo[] getLocalSites(java.lang.String na)
- Overrides:
getLocalSites
in classConfiguration
-
setGlobalValues
@Deprecated public void setGlobalValues(HandleValue[] globalValues)
Deprecated.- Specified by:
setGlobalValues
in classConfiguration
-
setGlobalValuesFile
public void setGlobalValuesFile(java.io.File newGlobalValuesFile)
-
setBootstrapHandles
public void setBootstrapHandles(BootstrapHandles bootstrapHandles)
- Specified by:
setBootstrapHandles
in classConfiguration
-
persist
public void persist()
save the default global values in the users' config directory- Specified by:
persist
in classConfiguration
-
setConfigDir
public void setConfigDir(java.io.File newConfigDir)
-
getConfigDir
public java.io.File getConfigDir()
-
getGlobalValues
public HandleValue[] getGlobalValues()
- Specified by:
getGlobalValues
in classConfiguration
-
getGlobalNamespace
public NamespaceInfo getGlobalNamespace()
- Specified by:
getGlobalNamespace
in classConfiguration
-
setGlobalSites
public void setGlobalSites(SiteInfo[] globalSites)
- Specified by:
setGlobalSites
in classConfiguration
-
getGlobalSites
public SiteInfo[] getGlobalSites()
- Specified by:
getGlobalSites
in classConfiguration
-
setCacheSites
public void setCacheSites(SiteInfo[] cacheSites)
- Overrides:
setCacheSites
in classConfiguration
-
getCacheSites
public SiteInfo[] getCacheSites()
- Overrides:
getCacheSites
in classConfiguration
-
getResolutionMethod
public int getResolutionMethod()
- Overrides:
getResolutionMethod
in classConfiguration
-
setResolutionMethod
public void setResolutionMethod(int resolutionMethod)
- Overrides:
setResolutionMethod
in classConfiguration
-
isAutoUpdateRootInfo
public boolean isAutoUpdateRootInfo()
- Specified by:
isAutoUpdateRootInfo
in classConfiguration
-
setAutoUpdateRootInfo
public void setAutoUpdateRootInfo(boolean enabled)
- Specified by:
setAutoUpdateRootInfo
in classConfiguration
-
getPreferredGlobalServiceHandle
public java.lang.String getPreferredGlobalServiceHandle()
- Overrides:
getPreferredGlobalServiceHandle
in classConfiguration
-
getRootKeys
public java.util.List<java.security.PublicKey> getRootKeys()
- Specified by:
getRootKeys
in classConfiguration
-
setRootKeys
public void setRootKeys(java.util.List<java.security.PublicKey> rootKeys)
- Specified by:
setRootKeys
in classConfiguration
-
getBootstrapHandles
public BootstrapHandles getBootstrapHandles()
- Specified by:
getBootstrapHandles
in classConfiguration
-
-