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.StringAUTO_UPDATE_ROOT_INFOstatic java.lang.StringPREFERRED_GLOBAL_SERVICE_HANDLEstatic java.lang.StringSITE_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 voidconfigureResolver(HandleResolver resolver)static voidconfigureResolverUsingKeys(HandleResolver resolver, net.cnri.util.StreamTable configTable)BootstrapHandlesgetBootstrapHandles()SiteInfo[]getCacheSites()java.io.FilegetConfigDir()static java.io.FilegetDefaultConfigDir()NamespaceInfogetGlobalNamespace()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.StringgetPreferredGlobalServiceHandle()intgetResolutionMethod()java.util.List<java.security.PublicKey>getRootKeys()booleanisAutoUpdateRootInfo()java.net.InetAddressmapLocalAddress(java.net.InetAddress addr)If the given address appears in the local address map return the address to which it is mapped.voidpersist()save the default global values in the users' config directoryvoidsaveLocalAddressMap()Saves the local address map to the appropriate configuration filevoidsetAutoUpdateRootInfo(boolean enabled)voidsetBootstrapHandles(BootstrapHandles bootstrapHandles)voidsetCacheSites(SiteInfo[] cacheSites)voidsetConfigDir(java.io.File newConfigDir)voidsetGlobalSites(SiteInfo[] globalSites)voidsetGlobalValues(HandleValue[] globalValues)Deprecated.voidsetGlobalValuesFile(java.io.File newGlobalValuesFile)voidsetLocalAddressMap(java.util.Map<java.lang.String,java.lang.String> localAddrMap)Sets a map that converts IP addresses to alternate addresses.voidsetLocalSites(java.lang.String na, SiteInfo[] sites)voidsetResolutionMethod(int resolutionMethod)voidsetRootKeys(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:
configureResolverin classConfiguration
-
configureResolverUsingKeys
public static void configureResolverUsingKeys(HandleResolver resolver, net.cnri.util.StreamTable configTable)
-
setLocalSites
public void setLocalSites(java.lang.String na, SiteInfo[] sites)- Overrides:
setLocalSitesin 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:
setLocalAddressMapin classConfiguration
-
saveLocalAddressMap
public void saveLocalAddressMap() throws java.io.IOExceptionSaves the local address map to the appropriate configuration file- Overrides:
saveLocalAddressMapin 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:
getLocalAddressMapin 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:
mapLocalAddressin classConfiguration
-
getLocalSites
public SiteInfo[] getLocalSites(java.lang.String na)
- Overrides:
getLocalSitesin classConfiguration
-
setGlobalValues
@Deprecated public void setGlobalValues(HandleValue[] globalValues)
Deprecated.- Specified by:
setGlobalValuesin classConfiguration
-
setGlobalValuesFile
public void setGlobalValuesFile(java.io.File newGlobalValuesFile)
-
setBootstrapHandles
public void setBootstrapHandles(BootstrapHandles bootstrapHandles)
- Specified by:
setBootstrapHandlesin classConfiguration
-
persist
public void persist()
save the default global values in the users' config directory- Specified by:
persistin classConfiguration
-
setConfigDir
public void setConfigDir(java.io.File newConfigDir)
-
getConfigDir
public java.io.File getConfigDir()
-
getGlobalValues
public HandleValue[] getGlobalValues()
- Specified by:
getGlobalValuesin classConfiguration
-
getGlobalNamespace
public NamespaceInfo getGlobalNamespace()
- Specified by:
getGlobalNamespacein classConfiguration
-
setGlobalSites
public void setGlobalSites(SiteInfo[] globalSites)
- Specified by:
setGlobalSitesin classConfiguration
-
getGlobalSites
public SiteInfo[] getGlobalSites()
- Specified by:
getGlobalSitesin classConfiguration
-
setCacheSites
public void setCacheSites(SiteInfo[] cacheSites)
- Overrides:
setCacheSitesin classConfiguration
-
getCacheSites
public SiteInfo[] getCacheSites()
- Overrides:
getCacheSitesin classConfiguration
-
getResolutionMethod
public int getResolutionMethod()
- Overrides:
getResolutionMethodin classConfiguration
-
setResolutionMethod
public void setResolutionMethod(int resolutionMethod)
- Overrides:
setResolutionMethodin classConfiguration
-
isAutoUpdateRootInfo
public boolean isAutoUpdateRootInfo()
- Specified by:
isAutoUpdateRootInfoin classConfiguration
-
setAutoUpdateRootInfo
public void setAutoUpdateRootInfo(boolean enabled)
- Specified by:
setAutoUpdateRootInfoin classConfiguration
-
getPreferredGlobalServiceHandle
public java.lang.String getPreferredGlobalServiceHandle()
- Overrides:
getPreferredGlobalServiceHandlein classConfiguration
-
getRootKeys
public java.util.List<java.security.PublicKey> getRootKeys()
- Specified by:
getRootKeysin classConfiguration
-
setRootKeys
public void setRootKeys(java.util.List<java.security.PublicKey> rootKeys)
- Specified by:
setRootKeysin classConfiguration
-
getBootstrapHandles
public BootstrapHandles getBootstrapHandles()
- Specified by:
getBootstrapHandlesin classConfiguration
-
-