ca.cbc.sportwire.servlet
Class SportwireConfig
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--org.apache.commons.collections.ExtendedProperties
|
+--ca.cbc.sportwire.servlet.SportwireConfig
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class SportwireConfig
- extends org.apache.commons.collections.ExtendedProperties
SportwireConfig is a Properties object that builds itself from a
config file and can also be told to rebuild itself. (Rebuilding is
buggy, don't use it yet)
Created: Sat Nov 24 02:06:22 2001
- Version:
- $Id: SportwireConfig.java,v 1.7 2002/01/29 19:33:44 garym Exp $
- Author:
- Gary Lawrence Murphy
- See Also:
- Serialized Form
Inner classes inherited from class org.apache.commons.collections.ExtendedProperties |
org.apache.commons.collections.ExtendedProperties.PropertiesReader, org.apache.commons.collections.ExtendedProperties.PropertiesTokenizer |
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Fields inherited from class org.apache.commons.collections.ExtendedProperties |
basePath, defaults, file, fileSeparator, include, isInitialized, keysAsListed |
Fields inherited from class java.util.Hashtable |
count, emptyEnumerator, emptyIterator, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES |
Method Summary |
void |
addProperty(java.lang.String key,
java.lang.Object token)
|
void |
clearProperty(java.lang.String key)
|
void |
combine(org.apache.commons.collections.ExtendedProperties c)
|
void |
display()
|
boolean |
getBoolean(java.lang.String key)
|
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
|
java.lang.Boolean |
getBoolean(java.lang.String key,
java.lang.Boolean defaultValue)
|
byte |
getByte(java.lang.String key)
|
byte |
getByte(java.lang.String key,
byte defaultValue)
|
java.lang.Byte |
getByte(java.lang.String key,
java.lang.Byte defaultValue)
|
double |
getDouble(java.lang.String key)
|
double |
getDouble(java.lang.String key,
double defaultValue)
|
java.lang.Double |
getDouble(java.lang.String key,
java.lang.Double defaultValue)
|
float |
getFloat(java.lang.String key)
|
float |
getFloat(java.lang.String key,
float defaultValue)
|
java.lang.Float |
getFloat(java.lang.String key,
java.lang.Float defaultValue)
|
java.lang.String |
getInclude()
|
int |
getInt(java.lang.String name)
|
int |
getInt(java.lang.String name,
int def)
|
int |
getInteger(java.lang.String key)
|
int |
getInteger(java.lang.String key,
int defaultValue)
|
java.lang.Integer |
getInteger(java.lang.String key,
java.lang.Integer defaultValue)
|
java.util.Iterator |
getKeys()
|
java.util.Iterator |
getKeys(java.lang.String prefix)
|
long |
getLong(java.lang.String key)
|
long |
getLong(java.lang.String key,
long defaultValue)
|
java.lang.Long |
getLong(java.lang.String key,
java.lang.Long defaultValue)
|
java.util.Properties |
getProperties(java.lang.String key)
|
java.util.Properties |
getProperties(java.lang.String key,
java.util.Properties defaults)
|
java.lang.Object |
getProperty(java.lang.String key)
|
short |
getShort(java.lang.String key)
|
short |
getShort(java.lang.String key,
short defaultValue)
|
java.lang.Short |
getShort(java.lang.String key,
java.lang.Short defaultValue)
|
SportwireConfig.CacheState |
getState()
Get the state of concurrency |
java.lang.String |
getString(java.lang.String key)
|
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
|
java.lang.String[] |
getStringArray(java.lang.String key)
|
java.util.Vector |
getVector(java.lang.String key)
|
java.util.Vector |
getVector(java.lang.String key,
java.util.Vector defaultValue)
|
boolean |
isInitialized()
|
boolean |
isState(SportwireConfig.CacheState test)
Get the state of concurrency |
void |
load(java.io.InputStream input)
|
void |
load(java.io.InputStream input,
java.lang.String enc)
|
void |
reload()
|
void |
save(java.io.OutputStream output,
java.lang.String header)
|
void |
setInclude(java.lang.String inc)
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
|
void |
setState(SportwireConfig.CacheState v)
Set the concurrency state. |
org.apache.commons.collections.ExtendedProperties |
subset(java.lang.String prefix)
|
java.lang.String |
testBoolean(java.lang.String value)
|
private void |
waitState(SportwireConfig.CacheState s)
put the current thread into a wait until the
given state is over |
Methods inherited from class org.apache.commons.collections.ExtendedProperties |
, addPropertyDirect, addStringProperty, convertProperties, init |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, getEnumeration, getIterator, hashCode, isEmpty, keys, keySet, put, putAll, readObject, rehash, remove, size, toString, values, writeObject |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
cat
static org.apache.log4j.Category cat
configFilename
private java.lang.String configFilename
READABLE
private final SportwireConfig.CacheState READABLE
READING
private final SportwireConfig.CacheState READING
WRITING
private final SportwireConfig.CacheState WRITING
state
private SportwireConfig.CacheState state
SportwireConfig
public SportwireConfig(java.lang.String conf)
reload
public void reload()
isState
public boolean isState(SportwireConfig.CacheState test)
- Get the state of concurrency
- Returns:
- CacheState value of state.
getState
public SportwireConfig.CacheState getState()
- Get the state of concurrency
- Returns:
- CacheState value of state.
setState
public void setState(SportwireConfig.CacheState v)
- Set the concurrency state.
- Parameters:
v
- Value to assign to state.
waitState
private void waitState(SportwireConfig.CacheState s)
- put the current thread into a wait until the
given state is over
addProperty
public void addProperty(java.lang.String key,
java.lang.Object token)
- Overrides:
addProperty
in class org.apache.commons.collections.ExtendedProperties
clearProperty
public void clearProperty(java.lang.String key)
- Overrides:
clearProperty
in class org.apache.commons.collections.ExtendedProperties
combine
public void combine(org.apache.commons.collections.ExtendedProperties c)
- Overrides:
combine
in class org.apache.commons.collections.ExtendedProperties
display
public void display()
- Overrides:
display
in class org.apache.commons.collections.ExtendedProperties
getBoolean
public boolean getBoolean(java.lang.String key)
- Overrides:
getBoolean
in class org.apache.commons.collections.ExtendedProperties
getBoolean
public boolean getBoolean(java.lang.String key,
boolean defaultValue)
- Overrides:
getBoolean
in class org.apache.commons.collections.ExtendedProperties
getBoolean
public java.lang.Boolean getBoolean(java.lang.String key,
java.lang.Boolean defaultValue)
- Overrides:
getBoolean
in class org.apache.commons.collections.ExtendedProperties
getByte
public byte getByte(java.lang.String key)
- Overrides:
getByte
in class org.apache.commons.collections.ExtendedProperties
getByte
public byte getByte(java.lang.String key,
byte defaultValue)
- Overrides:
getByte
in class org.apache.commons.collections.ExtendedProperties
getByte
public java.lang.Byte getByte(java.lang.String key,
java.lang.Byte defaultValue)
- Overrides:
getByte
in class org.apache.commons.collections.ExtendedProperties
getDouble
public double getDouble(java.lang.String key)
- Overrides:
getDouble
in class org.apache.commons.collections.ExtendedProperties
getDouble
public double getDouble(java.lang.String key,
double defaultValue)
- Overrides:
getDouble
in class org.apache.commons.collections.ExtendedProperties
getDouble
public java.lang.Double getDouble(java.lang.String key,
java.lang.Double defaultValue)
- Overrides:
getDouble
in class org.apache.commons.collections.ExtendedProperties
getFloat
public float getFloat(java.lang.String key)
- Overrides:
getFloat
in class org.apache.commons.collections.ExtendedProperties
getFloat
public float getFloat(java.lang.String key,
float defaultValue)
- Overrides:
getFloat
in class org.apache.commons.collections.ExtendedProperties
getFloat
public java.lang.Float getFloat(java.lang.String key,
java.lang.Float defaultValue)
- Overrides:
getFloat
in class org.apache.commons.collections.ExtendedProperties
getInclude
public java.lang.String getInclude()
- Overrides:
getInclude
in class org.apache.commons.collections.ExtendedProperties
getInt
public int getInt(java.lang.String name)
- Overrides:
getInt
in class org.apache.commons.collections.ExtendedProperties
getInt
public int getInt(java.lang.String name,
int def)
- Overrides:
getInt
in class org.apache.commons.collections.ExtendedProperties
getInteger
public int getInteger(java.lang.String key)
- Overrides:
getInteger
in class org.apache.commons.collections.ExtendedProperties
getInteger
public int getInteger(java.lang.String key,
int defaultValue)
- Overrides:
getInteger
in class org.apache.commons.collections.ExtendedProperties
getInteger
public java.lang.Integer getInteger(java.lang.String key,
java.lang.Integer defaultValue)
- Overrides:
getInteger
in class org.apache.commons.collections.ExtendedProperties
getKeys
public java.util.Iterator getKeys()
- Overrides:
getKeys
in class org.apache.commons.collections.ExtendedProperties
getKeys
public java.util.Iterator getKeys(java.lang.String prefix)
- Overrides:
getKeys
in class org.apache.commons.collections.ExtendedProperties
getLong
public long getLong(java.lang.String key)
- Overrides:
getLong
in class org.apache.commons.collections.ExtendedProperties
getLong
public long getLong(java.lang.String key,
long defaultValue)
- Overrides:
getLong
in class org.apache.commons.collections.ExtendedProperties
getLong
public java.lang.Long getLong(java.lang.String key,
java.lang.Long defaultValue)
- Overrides:
getLong
in class org.apache.commons.collections.ExtendedProperties
getProperties
public java.util.Properties getProperties(java.lang.String key)
- Overrides:
getProperties
in class org.apache.commons.collections.ExtendedProperties
getProperties
public java.util.Properties getProperties(java.lang.String key,
java.util.Properties defaults)
- Overrides:
getProperties
in class org.apache.commons.collections.ExtendedProperties
getProperty
public java.lang.Object getProperty(java.lang.String key)
- Overrides:
getProperty
in class org.apache.commons.collections.ExtendedProperties
getShort
public short getShort(java.lang.String key)
- Overrides:
getShort
in class org.apache.commons.collections.ExtendedProperties
getShort
public short getShort(java.lang.String key,
short defaultValue)
- Overrides:
getShort
in class org.apache.commons.collections.ExtendedProperties
getShort
public java.lang.Short getShort(java.lang.String key,
java.lang.Short defaultValue)
- Overrides:
getShort
in class org.apache.commons.collections.ExtendedProperties
getString
public java.lang.String getString(java.lang.String key)
- Overrides:
getString
in class org.apache.commons.collections.ExtendedProperties
getString
public java.lang.String getString(java.lang.String key,
java.lang.String defaultValue)
- Overrides:
getString
in class org.apache.commons.collections.ExtendedProperties
getStringArray
public java.lang.String[] getStringArray(java.lang.String key)
- Overrides:
getStringArray
in class org.apache.commons.collections.ExtendedProperties
getVector
public java.util.Vector getVector(java.lang.String key)
- Overrides:
getVector
in class org.apache.commons.collections.ExtendedProperties
getVector
public java.util.Vector getVector(java.lang.String key,
java.util.Vector defaultValue)
- Overrides:
getVector
in class org.apache.commons.collections.ExtendedProperties
isInitialized
public boolean isInitialized()
- Overrides:
isInitialized
in class org.apache.commons.collections.ExtendedProperties
load
public void load(java.io.InputStream input)
throws java.io.IOException
- Overrides:
load
in class org.apache.commons.collections.ExtendedProperties
load
public void load(java.io.InputStream input,
java.lang.String enc)
throws java.io.IOException
- Overrides:
load
in class org.apache.commons.collections.ExtendedProperties
save
public void save(java.io.OutputStream output,
java.lang.String header)
throws java.io.IOException
- Overrides:
save
in class org.apache.commons.collections.ExtendedProperties
setInclude
public void setInclude(java.lang.String inc)
- Overrides:
setInclude
in class org.apache.commons.collections.ExtendedProperties
setProperty
public void setProperty(java.lang.String key,
java.lang.Object value)
- Overrides:
setProperty
in class org.apache.commons.collections.ExtendedProperties
subset
public org.apache.commons.collections.ExtendedProperties subset(java.lang.String prefix)
- Overrides:
subset
in class org.apache.commons.collections.ExtendedProperties
testBoolean
public java.lang.String testBoolean(java.lang.String value)
- Overrides:
testBoolean
in class org.apache.commons.collections.ExtendedProperties