Package net.handle.hdllib
Class ConfigCommon
- java.lang.Object
-
- net.handle.hdllib.ConfigCommon
-
public class ConfigCommon extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ConfigCommon()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
badHHMMSS(java.lang.String timeString)
Return true if argument is not of legal form "HH:MM:SS" or "H:MM:SS", false otherwise.static net.cnri.util.StreamTable
configuration(int serverType, boolean disableUDP, int port, boolean logAccesses, java.net.InetAddress[] listenAddr, int threadCount, int httpPort, java.lang.String logSavingInterval, boolean caseSensitive, int maxAuthTime, int maxSessionTime, int serverId, boolean isPrimary, java.lang.String defaultServerAdmin, java.lang.String replicationAdminStr, java.lang.String replicationAuthStr, java.lang.String defaultHomedPrefix, boolean isDualStack, boolean serverAdminFullAccess)
static net.cnri.util.StreamTable
configuration(int serverType, boolean disableUDP, int port, boolean logAccesses, java.net.InetAddress listenAddr, int threadCount, int httpPort, java.lang.String logSavingInterval, boolean caseSensitive, int maxAuthTime, int maxSessionTime, int serverId, boolean isPrimary, java.lang.String defaultServerAdmin, java.lang.String replicationAdminStr, java.lang.String replicationAuthStr, java.lang.String defaultHomedPrefix, boolean serverAdminFullAccess)
Create and return a StreamTable full of configuration data suitable for writing to the configuration file (HSG.CONFIG_FILE_NAME).static net.cnri.util.StreamTable
contactDataTable(java.lang.String orgName, java.lang.String contactName, java.lang.String contactPhone, java.lang.String contactEmail)
Create and return a StreamTable full of contact data suitable for writing to a contact-data file (HSG.SITE_CONTACT_DATA_FILE_NAME).static void
createSiteBundle(java.lang.String siteBundleDir, java.lang.String siteBundleName, boolean isPrimary, java.lang.String replicationAdminStr, java.io.File adminPubKeyFile, java.io.File replPubKeyFile, java.lang.String replicationAuthStr, SiteInfo siteInfo, java.io.File contactDataFile, boolean isDualStack)
Create a "site bundle" of public information to be sent to hdladmin.static boolean
validPhoneNumberChar(char c)
Determine whether a character is legal in a phone number.static void
writeReplicationSiteFile(java.lang.String statDirName, java.lang.String statFileName, java.io.File replicationSiteFile, SiteInfo replicationSite)
Write the replication-site file.
-
-
-
Method Detail
-
configuration
public static net.cnri.util.StreamTable configuration(int serverType, boolean disableUDP, int port, boolean logAccesses, java.net.InetAddress listenAddr, int threadCount, int httpPort, java.lang.String logSavingInterval, boolean caseSensitive, int maxAuthTime, int maxSessionTime, int serverId, boolean isPrimary, java.lang.String defaultServerAdmin, java.lang.String replicationAdminStr, java.lang.String replicationAuthStr, java.lang.String defaultHomedPrefix, boolean serverAdminFullAccess)
Create and return a StreamTable full of configuration data suitable for writing to the configuration file (HSG.CONFIG_FILE_NAME).
-
configuration
public static net.cnri.util.StreamTable configuration(int serverType, boolean disableUDP, int port, boolean logAccesses, java.net.InetAddress[] listenAddr, int threadCount, int httpPort, java.lang.String logSavingInterval, boolean caseSensitive, int maxAuthTime, int maxSessionTime, int serverId, boolean isPrimary, java.lang.String defaultServerAdmin, java.lang.String replicationAdminStr, java.lang.String replicationAuthStr, java.lang.String defaultHomedPrefix, boolean isDualStack, boolean serverAdminFullAccess)
-
contactDataTable
public static net.cnri.util.StreamTable contactDataTable(java.lang.String orgName, java.lang.String contactName, java.lang.String contactPhone, java.lang.String contactEmail)
Create and return a StreamTable full of contact data suitable for writing to a contact-data file (HSG.SITE_CONTACT_DATA_FILE_NAME).
-
writeReplicationSiteFile
public static void writeReplicationSiteFile(java.lang.String statDirName, java.lang.String statFileName, java.io.File replicationSiteFile, SiteInfo replicationSite) throws java.io.IOException
Write the replication-site file.- Throws:
java.io.IOException
-
createSiteBundle
public static void createSiteBundle(java.lang.String siteBundleDir, java.lang.String siteBundleName, boolean isPrimary, java.lang.String replicationAdminStr, java.io.File adminPubKeyFile, java.io.File replPubKeyFile, java.lang.String replicationAuthStr, SiteInfo siteInfo, java.io.File contactDataFile, boolean isDualStack) throws java.lang.Exception
Create a "site bundle" of public information to be sent to hdladmin.- Throws:
java.lang.Exception
-
badHHMMSS
public static final boolean badHHMMSS(java.lang.String timeString)
Return true if argument is not of legal form "HH:MM:SS" or "H:MM:SS", false otherwise.
-
validPhoneNumberChar
public static boolean validPhoneNumberChar(char c)
Determine whether a character is legal in a phone number.
-
-