nl.justobjects.pushlet.core
Class Config

java.lang.Object
  extended by nl.justobjects.pushlet.core.Config
All Implemented Interfaces:
ConfigDefs

public class Config
extends java.lang.Object
implements ConfigDefs

Loads and maintains overall configuration.

Version:
$Id: Config.java,v 1.5 2007/11/23 21:10:17 justb Exp $
Author:
Just van den Broecke - Just Objects ©

Field Summary
private static java.util.Properties properties
           
private static java.lang.String PROPERTIES_FILE
           
 
Fields inherited from interface nl.justobjects.pushlet.core.ConfigDefs
CONTROLLER_CLASS, DISPATCHER_CLASS, LISTEN_FORCE_PULL_AGENTS, LISTEN_FORCE_PULL_ALL, LOG_LEVEL, LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_WARN, LOGGER_CLASS, POLL_REFRESH_TIMEOUT_MILLIS, POLL_REFRESH_WAIT_MAX_MILLIS, POLL_REFRESH_WAIT_MIN_MILLIS, PULL_REFRESH_TIMEOUT_MILLIS, PULL_REFRESH_WAIT_MAX_MILLIS, PULL_REFRESH_WAIT_MIN_MILLIS, QUEUE_READ_TIMEOUT_MILLIS, QUEUE_SIZE, QUEUE_WRITE_TIMEOUT_MILLIS, SESSION_CLASS, SESSION_ID_GENERATION, SESSION_ID_GENERATION_RANDOMSTRING, SESSION_ID_GENERATION_UUID, SESSION_ID_SIZE, SESSION_MANAGER_CLASS, SESSION_TIMEOUT_MINS, SOURCES_ACTIVATE, SUBSCRIBER_CLASS, SUBSCRIPTION_CLASS
 
Constructor Summary
Config()
           
 
Method Summary
static java.lang.Object createObject(java.lang.String aClassNameProp, java.lang.String aDefault)
          Factory method: create object from property denoting class name.
static boolean getBoolProperty(java.lang.String aName)
           
static java.lang.Class getClass(java.lang.String aClassNameProp, java.lang.String aDefault)
          Factory method: create object from property denoting class name.
static int getIntProperty(java.lang.String aName)
           
static long getLongProperty(java.lang.String aName)
           
static java.lang.String getProperty(java.lang.String aName)
           
static java.lang.String getProperty(java.lang.String aName, java.lang.String aDefault)
           
static boolean hasProperty(java.lang.String aName)
           
static void load(java.lang.String aDirPath)
          Initialize event sources from properties file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTIES_FILE

private static final java.lang.String PROPERTIES_FILE
See Also:
Constant Field Values

properties

private static java.util.Properties properties
Constructor Detail

Config

public Config()
Method Detail

createObject

public static java.lang.Object createObject(java.lang.String aClassNameProp,
                                            java.lang.String aDefault)
                                     throws PushletException
Factory method: create object from property denoting class name.

Parameters:
aClassNameProp - property name e.g. "session.class"
Returns:
an instance of class denoted by property
Throws:
PushletException - when class cannot be instantiated

getClass

public static java.lang.Class getClass(java.lang.String aClassNameProp,
                                       java.lang.String aDefault)
                                throws PushletException
Factory method: create object from property denoting class name.

Parameters:
aClassNameProp - property name e.g. "session.class"
Returns:
a Class object denoted by property
Throws:
PushletException - when class cannot be instantiated

load

public static void load(java.lang.String aDirPath)
Initialize event sources from properties file.


getProperty

public static java.lang.String getProperty(java.lang.String aName,
                                           java.lang.String aDefault)

getProperty

public static java.lang.String getProperty(java.lang.String aName)

getBoolProperty

public static boolean getBoolProperty(java.lang.String aName)

getIntProperty

public static int getIntProperty(java.lang.String aName)

getLongProperty

public static long getLongProperty(java.lang.String aName)

hasProperty

public static boolean hasProperty(java.lang.String aName)


Copyright 2000-2003 - Just Objects B.V.