org.tranche
Class ConfigureTranche

java.lang.Object
  extended by org.tranche.commons.ConfigurationUtil
      extended by org.tranche.ConfigureTranche

public class ConfigureTranche
extends org.tranche.commons.ConfigurationUtil

This is here to load a Tranche network's configuration information, including servers and certificates.

Author:
James "Augie" Hill - augman85@gmail.com, Bryan Smith - bryanesmith@gmail.com

Field Summary
static java.lang.String CATEGORY_BANNED_SERVERS
          The banned servers category.
static java.lang.String CATEGORY_CERTIFICATES
          The certificates category.
static java.lang.String CATEGORY_CORE_SERVERS
          The core servers category.
static java.lang.String CATEGORY_GENERAL
          The general category.
static java.lang.String CATEGORY_LOGGING
          The logging category.
static java.lang.String CATEGORY_NETWORK_TIME_SERVERS
          The network time servers category.
static java.lang.String CATEGORY_SERVER
          The server category.
static java.lang.String DEFAULT_CONFIG_FILE_LOCATION
           
static java.lang.String PROP_ADMIN_EMAIL_ACCOUNTS
          A comma-separated list of email addresses to which email notifications will be sent.
static java.lang.String PROP_CONNECTION_FULL_HASH_SPAN_THRESHOLD
          The number of servers at which only a single full hash span of servers are connected to.
static java.lang.String PROP_CONNECTION_TIMEOUTS
          The number of timeout exceptions to allow in a row before flagging a server offline.
static java.lang.String PROP_CONTACT_EMAIL
          The email address for users to contact.
static java.lang.String PROP_CONTACT_URL
          The URL where users can contact the administrators.
static java.lang.String PROP_DATA_URL
          The URL of the data set's descriptive information.
static java.lang.String PROP_DEFUNCT_SERVER_THRESHOLD
          Servers that are offline and do not update within this time get removed from the table.
static java.lang.String PROP_DESCRIPTION
          The description of the repository.
static java.lang.String PROP_DOWNLOAD_TOOL_URL
          The URL used to launch the Tranche Downloader Java Web Start application.
static java.lang.String PROP_EMAIL_URL
          The URL to HTTP POST email requests.
static java.lang.String PROP_HOME_URL
          The URL for the repository web site.
static java.lang.String PROP_KEEP_ALIVE_INTERVAL
          The number of milliseconds between sending a ping to each connected server to keep the socket alive.
static java.lang.String PROP_LAUNCH_TRANCHE_URL
          The URL used to launch the Tranche Java Web Start application.
static java.lang.String PROP_LOG_DOWNLOAD_FAILURE
          The URL to which the software will register failed downloads.
static java.lang.String PROP_LOG_DOWNLOAD_URL
          The URL to which the software will register downloads.
static java.lang.String PROP_LOG_ERROR_URL
          The URL to which the software will submit error logs.
static java.lang.String PROP_LOG_SERVER_URL
          The URL to which the software will submit server logs.
static java.lang.String PROP_LOG_UPLOAD_FAILURE_URL
          The URL to which the software will register upload failures.
static java.lang.String PROP_LOG_UPLOAD_URL
          The URL to which the software will register uploads.
static java.lang.String PROP_NAME
          The name of the repository.
static java.lang.String PROP_PROJECT_CACHE_HASH
          The Tranche hash of the project cache.
static java.lang.String PROP_PROJECT_CACHE_URL
          The URL of the project cache.
static java.lang.String PROP_PUBLISH_PASSPHRASE_URL
          The URL where a user can go to publish their data sets.
static java.lang.String PROP_REPLICATIONS
          The number of replications required for each chunk of data.
static java.lang.String PROP_SECURITY_CERTIFICATE_ADMIN
          The location of the public certificate for the administrator (all priveleges).
static java.lang.String PROP_SECURITY_CERTIFICATE_ANONYMOUS
          The location of the public certificate for the anonymous user.
static java.lang.String PROP_SECURITY_CERTIFICATE_AUTOCERT
          The location of the public certificate for the auto-certificate user (read, write).
static java.lang.String PROP_SECURITY_CERTIFICATE_EMAIL
          The location of the public certificate for the email user.
static java.lang.String PROP_SECURITY_CERTIFICATE_READ
          The location of the public certificate for the read-only user.
static java.lang.String PROP_SECURITY_CERTIFICATE_USER
          The location of the public certificate for the standard user (read, write, delete).
static java.lang.String PROP_SECURITY_CERTIFICATE_WRITE
          The location of the public certificate for the write-only user.
static java.lang.String PROP_SECURITY_KEY_ANONYMOUS
          The location of the private key for the anonymous user.
static java.lang.String PROP_SECURITY_KEY_EMAIL
          The location of the private key for the email user.
static java.lang.String PROP_SERVER_CLIENTS_MAX
          The maximum number of clients that can concurrently connect to a server.
static java.lang.String PROP_SERVER_CONFIG_ATTR_URL
          The URL of the updated server configuration attributes.
static java.lang.String PROP_SERVER_DIRECTORY
          The starting location of the directory that contains all the server configuration and runtime files.
static java.lang.String PROP_SERVER_KEEP_ALIVE_TIMEOUT
          The maximum number of milliseconds before a request that is being kept alive is timed out.
static java.lang.String PROP_SERVER_OFFLINE_NOTIFICATION_INTERVAL
          The number of milliseconds between sending offline server notification emails.
static java.lang.String PROP_SERVER_PORT
          The starting port number for a server.
static java.lang.String PROP_SERVER_QUEUE_SIZE
          The maximum number of requests a client can have outstanding on a server.
static java.lang.String PROP_SERVER_SERVER_SIMULTANEOUS_REQUESTS
          The number of requests a single server can have executed simultaneously on a server.
static java.lang.String PROP_SERVER_SSL
          The starting boolean for whether a server should communicate over SSL.
static java.lang.String PROP_SERVER_TIME_BETWEEN_REGISTRATIONS
          The amount of time that may pass before reregistering the local server with connected servers in the server status update process.
static java.lang.String PROP_SERVER_TIMEOUT
          The maximum number of milliseconds before a request to a server times out if it doesn't send back a feep-alive signal.
static java.lang.String PROP_SERVER_USER_SIMULTANEOUS_REQUESTS
          The number of requests a single user can have executed simultaneously on a server.
static java.lang.String PROP_SIGN_UP_URL
          The URL for users to sign up for the repository.
static java.lang.String PROP_STATUS_UPDATE_CLIENT_FREQUENCY
          The number of milliseconds between updating the network status table on a client.
static java.lang.String PROP_STATUS_UPDATE_SERVER_FREQUENCY
          The number of milliseconds between updating the network status table on a server.
static java.lang.String PROP_STATUS_UPDATE_SERVER_GROUPING
          The number of servers in a network status table group.
static java.lang.String PROP_TIME_CHANGE_CHECK_DEVIATION
          The number of milliseconds the actual timestamp can deviate from the expected timestamp before resetting the network time.
static java.lang.String PROP_TIME_CHANGE_CHECK_INTERVAL
          The number of milliseconds between checking if the system time has been changed significantly.
static java.lang.String PROP_TIME_UPDATE_INTERVAL
          The number of milliseconds between forcing a reset of the network time.
static java.lang.String PROP_TIME_UPDATE_TIMEOUT
          The timeout per NT server request.
static java.lang.String PROP_UPDATE_CONFIG_INTERVAL
          The number of milliseconds between updating the configuration.
static java.lang.String PROP_UPDATE_CONFIG_URL
          The URL where an updated configuration file can be found.
static java.lang.String PROP_UPLOAD_TOOL_URL
          The URL used to launch the Tranche Uploader Java Web Start application.
static java.lang.String PROP_USER_LOG_IN_URL
          The URL where users can log in to get their valid user zip files.
 
Fields inherited from class org.tranche.commons.ConfigurationUtil
CATEGORY_DEBUG, CATEGORY_DEFAULT
 
Constructor Summary
protected ConfigureTranche()
           
 
Method Summary
static java.lang.String[] getAdminEmailAccounts()
          Returns a string array of administrator email addresses.
static java.util.Map<java.lang.String,java.lang.String> getServerConfigurationAttributes()
          Returns network-wide server attributes from URL.
static void load(java.io.InputStream configFileStream)
           
static void load(java.lang.String configFile)
           
static void load(java.lang.String[] args)
           
static void update()
           
static void waitForStartup()
           
 
Methods inherited from class org.tranche.commons.ConfigurationUtil
clear, clearAll, clearAllDefaults, clearDefaults, get, get, getBoolean, getBoolean, getCategoryNames, getDefault, getDefault, getDefaultList, getDefaultList, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getList, getList, getLong, getLong, getPropertyNames, loadDefaults, loadDefaults, loadDefaults, openStreamToFile, readLine, readLineIgnoreComments, remove, remove, removeDefault, removeDefault, removeDefaultList, removeDefaultList, removeList, removeList, set, set, setDefault, setDefault, setDefaultList, setDefaultList, setDefaultList, setList, setList, setList, setList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_GENERAL

public static final java.lang.String CATEGORY_GENERAL

The general category.

See Also:
Constant Field Values

PROP_ADMIN_EMAIL_ACCOUNTS

public static final java.lang.String PROP_ADMIN_EMAIL_ACCOUNTS

A comma-separated list of email addresses to which email notifications will be sent.

See Also:
Constant Field Values

PROP_CONNECTION_FULL_HASH_SPAN_THRESHOLD

public static final java.lang.String PROP_CONNECTION_FULL_HASH_SPAN_THRESHOLD

The number of servers at which only a single full hash span of servers are connected to.

See Also:
Constant Field Values

PROP_KEEP_ALIVE_INTERVAL

public static final java.lang.String PROP_KEEP_ALIVE_INTERVAL

The number of milliseconds between sending a ping to each connected server to keep the socket alive.

See Also:
Constant Field Values

PROP_CONNECTION_TIMEOUTS

public static final java.lang.String PROP_CONNECTION_TIMEOUTS

The number of timeout exceptions to allow in a row before flagging a server offline.

See Also:
Constant Field Values

PROP_CONTACT_EMAIL

public static final java.lang.String PROP_CONTACT_EMAIL

The email address for users to contact.

See Also:
Constant Field Values

PROP_CONTACT_URL

public static final java.lang.String PROP_CONTACT_URL

The URL where users can contact the administrators.

See Also:
Constant Field Values

PROP_DESCRIPTION

public static final java.lang.String PROP_DESCRIPTION

The description of the repository.

See Also:
Constant Field Values

PROP_EMAIL_URL

public static final java.lang.String PROP_EMAIL_URL

The URL to HTTP POST email requests.

See Also:
Constant Field Values

PROP_HOME_URL

public static final java.lang.String PROP_HOME_URL

The URL for the repository web site.

See Also:
Constant Field Values

PROP_LAUNCH_TRANCHE_URL

public static final java.lang.String PROP_LAUNCH_TRANCHE_URL

The URL used to launch the Tranche Java Web Start application.

See Also:
Constant Field Values

PROP_DOWNLOAD_TOOL_URL

public static final java.lang.String PROP_DOWNLOAD_TOOL_URL

The URL used to launch the Tranche Downloader Java Web Start application.

See Also:
Constant Field Values

PROP_UPLOAD_TOOL_URL

public static final java.lang.String PROP_UPLOAD_TOOL_URL

The URL used to launch the Tranche Uploader Java Web Start application.

See Also:
Constant Field Values

PROP_NAME

public static final java.lang.String PROP_NAME

The name of the repository.

See Also:
Constant Field Values

PROP_PROJECT_CACHE_HASH

public static final java.lang.String PROP_PROJECT_CACHE_HASH

The Tranche hash of the project cache. The project cache URL will be tried first.

See Also:
Constant Field Values

PROP_PROJECT_CACHE_URL

public static final java.lang.String PROP_PROJECT_CACHE_URL

The URL of the project cache.

See Also:
Constant Field Values

PROP_PUBLISH_PASSPHRASE_URL

public static final java.lang.String PROP_PUBLISH_PASSPHRASE_URL

The URL where a user can go to publish their data sets.

See Also:
Constant Field Values

PROP_DATA_URL

public static final java.lang.String PROP_DATA_URL

The URL of the data set's descriptive information.

See Also:
Constant Field Values

PROP_REPLICATIONS

public static final java.lang.String PROP_REPLICATIONS

The number of replications required for each chunk of data.

See Also:
Constant Field Values

PROP_SIGN_UP_URL

public static final java.lang.String PROP_SIGN_UP_URL

The URL for users to sign up for the repository.

See Also:
Constant Field Values

PROP_DEFUNCT_SERVER_THRESHOLD

public static final java.lang.String PROP_DEFUNCT_SERVER_THRESHOLD

Servers that are offline and do not update within this time get removed from the table.

See Also:
Constant Field Values

PROP_STATUS_UPDATE_CLIENT_FREQUENCY

public static final java.lang.String PROP_STATUS_UPDATE_CLIENT_FREQUENCY

The number of milliseconds between updating the network status table on a client.

See Also:
Constant Field Values

PROP_STATUS_UPDATE_SERVER_FREQUENCY

public static final java.lang.String PROP_STATUS_UPDATE_SERVER_FREQUENCY

The number of milliseconds between updating the network status table on a server.

See Also:
Constant Field Values

PROP_STATUS_UPDATE_SERVER_GROUPING

public static final java.lang.String PROP_STATUS_UPDATE_SERVER_GROUPING

The number of servers in a network status table group. Used in server status propagation.

See Also:
Constant Field Values

PROP_USER_LOG_IN_URL

public static final java.lang.String PROP_USER_LOG_IN_URL

The URL where users can log in to get their valid user zip files.

See Also:
Constant Field Values

PROP_UPDATE_CONFIG_URL

public static final java.lang.String PROP_UPDATE_CONFIG_URL

The URL where an updated configuration file can be found. The update will occur at regular intervals at about the same time on all clients and servers. If the location for certificate files has changed, they will be reloaded from the new location.

See Also:
Constant Field Values

PROP_UPDATE_CONFIG_INTERVAL

public static final java.lang.String PROP_UPDATE_CONFIG_INTERVAL

The number of milliseconds between updating the configuration.

See Also:
Constant Field Values

CATEGORY_CORE_SERVERS

public static final java.lang.String CATEGORY_CORE_SERVERS

The core servers category.

See Also:
Constant Field Values

CATEGORY_BANNED_SERVERS

public static final java.lang.String CATEGORY_BANNED_SERVERS

The banned servers category.

See Also:
Constant Field Values

CATEGORY_CERTIFICATES

public static final java.lang.String CATEGORY_CERTIFICATES

The certificates category.

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_ADMIN

public static final java.lang.String PROP_SECURITY_CERTIFICATE_ADMIN

The location of the public certificate for the administrator (all priveleges).

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_ANONYMOUS

public static final java.lang.String PROP_SECURITY_CERTIFICATE_ANONYMOUS

The location of the public certificate for the anonymous user.

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_AUTOCERT

public static final java.lang.String PROP_SECURITY_CERTIFICATE_AUTOCERT

The location of the public certificate for the auto-certificate user (read, write).

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_EMAIL

public static final java.lang.String PROP_SECURITY_CERTIFICATE_EMAIL

The location of the public certificate for the email user.

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_READ

public static final java.lang.String PROP_SECURITY_CERTIFICATE_READ

The location of the public certificate for the read-only user.

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_USER

public static final java.lang.String PROP_SECURITY_CERTIFICATE_USER

The location of the public certificate for the standard user (read, write, delete).

See Also:
Constant Field Values

PROP_SECURITY_CERTIFICATE_WRITE

public static final java.lang.String PROP_SECURITY_CERTIFICATE_WRITE

The location of the public certificate for the write-only user.

See Also:
Constant Field Values

PROP_SECURITY_KEY_ANONYMOUS

public static final java.lang.String PROP_SECURITY_KEY_ANONYMOUS

The location of the private key for the anonymous user.

See Also:
Constant Field Values

PROP_SECURITY_KEY_EMAIL

public static final java.lang.String PROP_SECURITY_KEY_EMAIL

The location of the private key for the email user.

See Also:
Constant Field Values

CATEGORY_LOGGING

public static final java.lang.String CATEGORY_LOGGING

The logging category.

See Also:
Constant Field Values

PROP_LOG_DOWNLOAD_FAILURE

public static final java.lang.String PROP_LOG_DOWNLOAD_FAILURE

The URL to which the software will register failed downloads.

See Also:
Constant Field Values

PROP_LOG_DOWNLOAD_URL

public static final java.lang.String PROP_LOG_DOWNLOAD_URL

The URL to which the software will register downloads.

See Also:
Constant Field Values

PROP_LOG_ERROR_URL

public static final java.lang.String PROP_LOG_ERROR_URL

The URL to which the software will submit error logs.

See Also:
Constant Field Values

PROP_LOG_SERVER_URL

public static final java.lang.String PROP_LOG_SERVER_URL

The URL to which the software will submit server logs.

See Also:
Constant Field Values

PROP_LOG_UPLOAD_FAILURE_URL

public static final java.lang.String PROP_LOG_UPLOAD_FAILURE_URL

The URL to which the software will register upload failures.

See Also:
Constant Field Values

PROP_LOG_UPLOAD_URL

public static final java.lang.String PROP_LOG_UPLOAD_URL

The URL to which the software will register uploads.

See Also:
Constant Field Values

CATEGORY_SERVER

public static final java.lang.String CATEGORY_SERVER

The server category.

See Also:
Constant Field Values

PROP_SERVER_CLIENTS_MAX

public static final java.lang.String PROP_SERVER_CLIENTS_MAX

The maximum number of clients that can concurrently connect to a server.

See Also:
Constant Field Values

PROP_SERVER_CONFIG_ATTR_URL

public static final java.lang.String PROP_SERVER_CONFIG_ATTR_URL

The URL of the updated server configuration attributes.

See Also:
Constant Field Values

PROP_SERVER_DIRECTORY

public static final java.lang.String PROP_SERVER_DIRECTORY

The starting location of the directory that contains all the server configuration and runtime files.

See Also:
Constant Field Values

PROP_SERVER_KEEP_ALIVE_TIMEOUT

public static final java.lang.String PROP_SERVER_KEEP_ALIVE_TIMEOUT

The maximum number of milliseconds before a request that is being kept alive is timed out.

See Also:
Constant Field Values

PROP_SERVER_OFFLINE_NOTIFICATION_INTERVAL

public static final java.lang.String PROP_SERVER_OFFLINE_NOTIFICATION_INTERVAL

The number of milliseconds between sending offline server notification emails.

See Also:
Constant Field Values

PROP_SERVER_PORT

public static final java.lang.String PROP_SERVER_PORT

The starting port number for a server.

See Also:
Constant Field Values

PROP_SERVER_QUEUE_SIZE

public static final java.lang.String PROP_SERVER_QUEUE_SIZE

The maximum number of requests a client can have outstanding on a server.

See Also:
Constant Field Values

PROP_SERVER_TIME_BETWEEN_REGISTRATIONS

public static final java.lang.String PROP_SERVER_TIME_BETWEEN_REGISTRATIONS

The amount of time that may pass before reregistering the local server with connected servers in the server status update process.

See Also:
Constant Field Values

PROP_SERVER_SERVER_SIMULTANEOUS_REQUESTS

public static final java.lang.String PROP_SERVER_SERVER_SIMULTANEOUS_REQUESTS

The number of requests a single server can have executed simultaneously on a server.

See Also:
Constant Field Values

PROP_SERVER_SSL

public static final java.lang.String PROP_SERVER_SSL

The starting boolean for whether a server should communicate over SSL.

See Also:
Constant Field Values

PROP_SERVER_TIMEOUT

public static final java.lang.String PROP_SERVER_TIMEOUT

The maximum number of milliseconds before a request to a server times out if it doesn't send back a feep-alive signal.

See Also:
Constant Field Values

PROP_SERVER_USER_SIMULTANEOUS_REQUESTS

public static final java.lang.String PROP_SERVER_USER_SIMULTANEOUS_REQUESTS

The number of requests a single user can have executed simultaneously on a server.

See Also:
Constant Field Values

CATEGORY_NETWORK_TIME_SERVERS

public static final java.lang.String CATEGORY_NETWORK_TIME_SERVERS

The network time servers category.

See Also:
Constant Field Values

PROP_TIME_CHANGE_CHECK_DEVIATION

public static final java.lang.String PROP_TIME_CHANGE_CHECK_DEVIATION

The number of milliseconds the actual timestamp can deviate from the expected timestamp before resetting the network time.

See Also:
Constant Field Values

PROP_TIME_CHANGE_CHECK_INTERVAL

public static final java.lang.String PROP_TIME_CHANGE_CHECK_INTERVAL

The number of milliseconds between checking if the system time has been changed significantly.

See Also:
Constant Field Values

PROP_TIME_UPDATE_INTERVAL

public static final java.lang.String PROP_TIME_UPDATE_INTERVAL

The number of milliseconds between forcing a reset of the network time.

See Also:
Constant Field Values

PROP_TIME_UPDATE_TIMEOUT

public static final java.lang.String PROP_TIME_UPDATE_TIMEOUT

The timeout per NT server request.

See Also:
Constant Field Values

DEFAULT_CONFIG_FILE_LOCATION

public static final java.lang.String DEFAULT_CONFIG_FILE_LOCATION
See Also:
Constant Field Values
Constructor Detail

ConfigureTranche

protected ConfigureTranche()
Method Detail

getAdminEmailAccounts

public static final java.lang.String[] getAdminEmailAccounts()

Returns a string array of administrator email addresses.

Returns:

waitForStartup

public static void waitForStartup()

load

public static void load(java.lang.String[] args)
                 throws java.io.IOException
Parameters:
args -
Throws:
java.io.IOException

load

public static void load(java.lang.String configFile)
                 throws java.io.IOException
Parameters:
configFile -
Throws:
java.io.IOException

load

public static void load(java.io.InputStream configFileStream)
Parameters:
configFileStream -

update

public static void update()

getServerConfigurationAttributes

public static java.util.Map<java.lang.String,java.lang.String> getServerConfigurationAttributes()

Returns network-wide server attributes from URL.

Returns:


This code is free for use both commercially and non-commercially as stated in the project's license