|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.CoreConsts
public final class CoreConsts
This holds fundamental compile-time constants for all parts of PG2K.
| Field Summary | |
|---|---|
static java.util.Set<java.lang.String> |
ALL_FS_CONF_FILENAMES
Immutable Set of all configuration filenames (as String values). |
static java.lang.String |
APP_DEFAULT_NAME
Default name by which whole app is known internally. |
static int |
ASYNC_MIN_POWER_SAVE_NON_CRITICAL_DATA_FLUSH_MS
Target minimum interval of flushes of non-critical data to disc or persistent store in power-save mode; strictly positive (ms). |
static java.lang.String |
ATTR_I18N_DESC_PREFIX
Prefix of i18n-ed attribute word descriptions. |
static boolean |
AVOID_UNSAFE_TCP_TIMEOUTS
If true, avoid using connection and read timeouts on sockets. |
static int |
BULK_DATA_TRANSFER_SIZE
Suggested transfer size of exhibit data (and some other bulk data). |
static java.text.SimpleDateFormat |
DEFAULT_DATE_FORMAT
Our preferred simple date formater for all locales; yyyy/MM/dd Japanese style. |
static int |
DEFAULT_TEMPORAL_SLACKNESS_S
Default temporal slackness in seconds; strictly positive. |
static java.lang.String |
DESCRIPTION_FILE_SUFFIX
Description suffix on full path name of exhibit. |
static int |
DESCRIPTION_MAX_CHARS
Maximum length of description entry (or entries) in characters. |
static java.lang.String |
DO_NOTHING_PAGE_RRURL
Do-nothing page root-relative URL that will accept any parameters and does no work. |
static java.lang.String |
FILE_ENCODING_8859_1
8-bit ISO-8859-1 file encoding. |
static java.lang.String |
FILE_ENCODING_ASCII7
7-bit ASCII file encoding, also by definition valid ISO-8859-1 and UTF-8. |
static java.lang.String |
FILE_ENCODING_UTF_8
8-bit UTF-8 file encoding. |
static java.lang.String |
FS_CONF_ROOT
Default base dir for meta-data load from filesystem. |
static java.lang.String |
FS_CONF_SECPROPS
Filesystem path below conf root for load/save of private security properties. |
static java.lang.String |
FS_CONF_SYSPROPS
Filesystem path below conf root for load/save of global system properties. |
static java.lang.String |
FS_DATA_CACHE_FILENAME
Name of static properties cache file usually within data directory. |
static java.lang.String |
FS_DATA_HASH_FILENAME
Name of static properties hash file usually within data directory. |
static java.lang.String |
FS_DATA_ROOT
Default dase dir for exhibit data load from filesystem. |
static long |
GALLERY_EPOC_START
Approximate start date of the Gallery, primarily for validating timestamps, etc; strictly positive. |
static java.lang.String |
GEN_PREFIX_debugFlag
GenProps debug flag tree root, including trailing dot. |
static java.lang.String |
GLOBAL_PROPS_NAME
Name of properties class/file on classpath containing simple global properties. |
static java.lang.String |
HASH_CRC32
Checksum/hash for data to correspond to use in tools such as [G]ZIP; not "secure". |
static java.lang.String |
HASH_MD5
Alternative fast hash for data integrity; reasonably "secure". |
static java.lang.String |
HASH_SHA1
Preferred hash for data integrity; reasonably "secure". |
static java.lang.String |
HMAC_ALG
HMAC authentication hash algorithm to protect data in transit. |
static java.lang.String |
JNDI_COMPENV_PREFIX
java:comp/env usual JNDI namespace prefix for EJBs... |
static java.lang.String |
JNDI_SHORT_NAME_ExhibitFacade
Short JNDI name by which ExhibitFacade front-end (session) bean is accessed. |
static java.lang.String |
JNDI_SHORT_NAME_PropsFacade
Short JNDI name by which PropsFacade front-end (session) bean is accessed. |
static java.lang.String |
LOCDB_PROPS_NAME
Name of properties class/file on classpath or in exhibits area containing built-in location-map data. |
static java.lang.String |
MAIN_DATA_HOST
Name of main exhibit and catalogue-page server host(s); generally sessionless. |
static long |
MAX_EXHIBIT_AGE_NEW_MS
Max age of an exhibit to be considered "new", in milliseconds; strictly positive. |
static int |
MAX_EXHIBIT_AGE_NEW_S
Max age of an exhibit to be considered "new", in seconds; strictly positive. |
static long |
MAX_EXPECTED_LOW_POWER_RUN_MS
Maximum time that we expect the system to have to remain in low-power mode in one stretch (ms); strictly positive. |
static int |
MAX_INTERACTIVE_DELAY_MS
Time short enough not to be noticable to users in GUI interactions, ms; strictly positive. |
static int |
MAX_PASSWORD_LEN
Maximum password length for all (eg Web) logins; strictly positive. |
static int |
MAX_PEER_CLOCK_SKEW_MS
Maximum permissible clock skew between any two PG2K server instances, ms; strictly positive. |
static int |
MAX_TYPICAL_RPC_RTT_MS
Maximum time that a typical inter-server RPC call should take (eg round the Earth, over the Internet), ms; strictly positive. |
static int |
MIN_PASSWORD_LEN
Minimum password length for all (eg Web) logins; strictly positive. |
static java.lang.String |
PRIV_ROLE_NAME
Role name (user/group) to for most priv actions. |
static java.lang.String |
SYMTIME_I18N_PREFIX
Prefix of i18n-ed symbolic filter times. |
static java.lang.String |
TUNNEL_URI
Tunnel URL on server. |
static java.lang.String |
WAR_CTXTPARAM_AGGRESSIVE_CACHE
Name of WAR context-param boolean flag to set cache aggressiveness. |
static java.lang.String |
WAR_CTXTPARAM_BOOTURL
Name of WAR context-param boot-server URL. |
static java.lang.String |
WAR_CTXTPARAM_DISPOSITION
Name of WAR context-param `master/slave/etc' flag. |
static java.lang.String |
WAR_CTXTPARAM_DISPOSITION_MASTER
Master (J2EE) taking data from EJBs (and probably not with / context root). |
static java.lang.String |
WAR_CTXTPARAM_DISPOSITION_SLAVE
Slave (pure WAR) taking data over HTTP tunnel, with / context root. |
static java.lang.String |
WAR_CTXTPARAM_DISPOSITION_WARONLY
Master (pure WAR) taking data from filesystem, with / context root. |
static java.lang.String |
WAR_SYSPROPNAME_DISPOSITION_PRESET
The WAR context-param `master/slave' flag can be set early with this named system property. |
| Constructor Summary | |
|---|---|
CoreConsts()
|
|
| Method Summary |
|---|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String APP_DEFAULT_NAME
public static final java.lang.String PRIV_ROLE_NAME
public static final java.lang.String FILE_ENCODING_8859_1
public static final java.lang.String FILE_ENCODING_UTF_8
public static final java.lang.String FILE_ENCODING_ASCII7
public static final java.lang.String MAIN_DATA_HOST
This is rendered all lower-case to slightly improve compressability in certain contexts, and is also prefixless (eg no "www.") to be in canonical form.
This is also a base name of which some subdomains are significant, eg as mirrors.
public static final int DEFAULT_TEMPORAL_SLACKNESS_S
This can be used, for example, as a default time for which exhibits and catalogue pages may be cached by a client, and that we might internally cache exhibit properties, etc.
Note that it may sometimes be necessary to ensure that multiples of this interval cannot be catenated in bad cases.
public static final long GALLERY_EPOC_START
Other dates may be validated with reference this value.
It is probably accurate enough to use in synthetic copyright notices too.
The Gallery started in 1996/1997.
For reference:
public static final java.lang.String JNDI_COMPENV_PREFIX
public static final java.lang.String JNDI_SHORT_NAME_ExhibitFacade
public static final java.lang.String JNDI_SHORT_NAME_PropsFacade
public static final java.lang.String FS_DATA_ROOT
public static final java.lang.String FS_CONF_ROOT
public static final java.lang.String FS_CONF_SYSPROPS
public static final java.lang.String FS_CONF_SECPROPS
public static final java.lang.String FS_DATA_CACHE_FILENAME
public static final java.lang.String FS_DATA_HASH_FILENAME
Typically, removing this file, or specifying an old/extant AEP hash different to this, will force the AEP to be reconstructed from the filesystem.
For most purposes this is read-only, but some applications are able to write to it to atomically update it.
This file should be (maybe manually) removed once new exhibits have been added/changed.removed; this will prompt scanning for changes.
public static final java.util.Set<java.lang.String> ALL_FS_CONF_FILENAMES
public static final java.lang.String GLOBAL_PROPS_NAME
public static final java.lang.String LOCDB_PROPS_NAME
public static final java.lang.String WAR_CTXTPARAM_AGGRESSIVE_CACHE
public static final java.lang.String WAR_CTXTPARAM_DISPOSITION
public static final java.lang.String WAR_CTXTPARAM_DISPOSITION_MASTER
public static final java.lang.String WAR_CTXTPARAM_DISPOSITION_WARONLY
public static final java.lang.String WAR_CTXTPARAM_DISPOSITION_SLAVE
public static final java.lang.String WAR_SYSPROPNAME_DISPOSITION_PRESET
The property value must not conflict with that deduced my the default methods, if this property is defined at all.
public static final java.lang.String WAR_CTXTPARAM_BOOTURL
public static final java.text.SimpleDateFormat DEFAULT_DATE_FORMAT
public static final int DESCRIPTION_MAX_CHARS
public static final java.lang.String DESCRIPTION_FILE_SUFFIX
public static final int MIN_PASSWORD_LEN
public static final int MAX_PASSWORD_LEN
public static final int MAX_INTERACTIVE_DELAY_MS
public static final int MAX_TYPICAL_RPC_RTT_MS
Some RPCs call may legitimately take (much) longer than this, so this should be used as a limit to stop blocking interactively for a response, but not to kill the request entirely (ie so that we can still hope to make progress in the background for next time).
This should be at least second or more, and possibly as much as 10--20 seconds (see below), but not so long as to completely kill interactivity of on-the-fly generated pages such as JSPs that force RPCs.
Some observed legitimate common RPCs take ~10s--20s because of bandwidth limits, eg for large event sets, even after compression.
(Note that in Windows NT the hard-wired initial HTTP TCP timeout was 3s, which seems to have been a little too short for legitimate long-delay paths.)
public static final java.lang.String HASH_CRC32
public static final java.lang.String HASH_SHA1
public static final java.lang.String HASH_MD5
public static final java.lang.String HMAC_ALG
Thus we want a strong-ish hash that is relatively collision-free, though hopefully not too expensive to compute nor contributing too much message overhead (ie too large a hash/MAC).
Note that our key generation and distribution is not necessarily very robust, ie anyone with access to any of the servers as root could steal the key, and thus tamper/insert to their heart's content, so we should not go overboard. This mechanism should prevent corruption and casual tampering by ISPs, transparent proxies, broken routers, and others that can play "man-in-the-middle", but without admin access to any servers. Note that this does not prevent any "man-in-the-middle" from observing all our traffic; we only need authetication, not encryption.
Note that not all communications need to be guarded by this MAC; in particular read-only operations by lightweight clients may not be (at least in part so that we do not need to distribute the secret key to them) which may save some CPU cycles and a little bandwidth. In particular we may respond without a MAC to a request without a (valid) MAC, which may also make it harder for an imposter to probe for our key.
The algorithm must be supported by the JDK or a plugged-in provider.
MD5 and SHA-1 are showing signs of age and weakness, so we need to use something of at least SHA-256 (256-bit) strength. All implementations wishing to communicate must agree on this algorithm.
public static final int MAX_EXHIBIT_AGE_NEW_S
public static final long MAX_EXHIBIT_AGE_NEW_MS
public static final boolean AVOID_UNSAFE_TCP_TIMEOUTS
public static final int BULK_DATA_TRANSFER_SIZE
This is large enough to be efficient and to allow the OS to be buffering up data for good throughput over TCP/IP for example, but small enough not to require stupid amounts of memory or time (and in particular to retain reasonable interactivity).
A power of two for efficiency in various places.
A size of about 1kByte to 64kBytes is probably reasonable; 16kB or less seems good to retain interactivity.
public static final java.lang.String DO_NOTHING_PAGE_RRURL
public static final java.lang.String TUNNEL_URI
public static final java.lang.String GEN_PREFIX_debugFlag
public static final int MAX_PEER_CLOCK_SKEW_MS
public static final java.lang.String ATTR_I18N_DESC_PREFIX
public static final java.lang.String SYMTIME_I18N_PREFIX
public static final int ASYNC_MIN_POWER_SAVE_NON_CRITICAL_DATA_FLUSH_MS
System components that observe this value should take especial care to flush when the application/JVM shuts down to avoid losing large amounts of data.
This is not intended to regulate the flushing of critical data.
Several tens of minutes is probably good.
public static final long MAX_EXPECTED_LOW_POWER_RUN_MS
This should be long enough to last for mid-winter RE system lows, for example. Typically this might be several days to even as much as a few weeks, though systems not running fully or partially off RE power will probably only run for a few hours in low-power mode each day at most, eg to avoid local grid peak load or peak carbon-intensity.
| Constructor Detail |
|---|
public CoreConsts()
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||