|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.environment.Environment
Used to provide properties, timesource, loggers etc to the FreePastry apps and components. XXX: Plan is to place the environment inside a PastryNode.
Field Summary | |
static java.lang.String[] |
defaultParamFileArray
DESCRIBE THE FIELD |
Constructor Summary | |
Environment()
Convienience for defaults. |
|
Environment(SelectorManager sm,
Processor proc,
RandomSource rs,
TimeSource time,
LogManager lm,
Parameters params)
Constructor. |
|
Environment(java.lang.String paramFileName)
Constructor for Environment. |
|
Environment(java.lang.String[] orderedDefaultFiles,
java.lang.String paramFileName)
Convienience for defaults. |
Method Summary | |
void |
addDestructable(Destructable destructable)
Adds a feature to the Destructable attribute of the Environment object |
protected void |
chooseDefaults()
Can be easily overridden by a subclass. |
void |
destroy()
Tears down the environment. |
static Environment |
directEnvironment()
DESCRIBE THE METHOD |
static LogManager |
generateDefaultLogManager(TimeSource time,
Parameters params)
DESCRIBE THE METHOD |
static Processor |
generateDefaultProcessor()
DESCRIBE THE METHOD |
static RandomSource |
generateDefaultRandomSource(Parameters params,
LogManager logging)
DESCRIBE THE METHOD |
static SelectorManager |
generateDefaultSelectorManager(TimeSource time,
LogManager logging)
DESCRIBE THE METHOD |
static TimeSource |
generateDefaultTimeSource()
DESCRIBE THE METHOD |
LogManager |
getLogManager()
Gets the LogManager attribute of the Environment object |
Parameters |
getParameters()
Gets the Parameters attribute of the Environment object |
Processor |
getProcessor()
Gets the Processor attribute of the Environment object |
RandomSource |
getRandomSource()
Gets the RandomSource attribute of the Environment object |
SelectorManager |
getSelectorManager()
Gets the SelectorManager attribute of the Environment object |
TimeSource |
getTimeSource()
Gets the TimeSource attribute of the Environment object |
void |
removeDestructable(Destructable destructable)
DESCRIBE THE METHOD |
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[] defaultParamFileArray
Constructor Detail |
public Environment(SelectorManager sm, Processor proc, RandomSource rs, TimeSource time, LogManager lm, Parameters params)
sm
- the SelectorManager. Default: rice.selector.SelectorManagerrs
- the RandomSource. Default:
rice.environment.random.simple.SimpleRandomSourcetime
- the TimeSource. Default:
rice.environment.time.simple.SimpleTimeSourcelm
- the LogManager. Default: rice.environment.logging.simple.SimpleLogManagerproc
- DESCRIBE THE PARAMETERparams
- DESCRIBE THE PARAMETERpublic Environment(java.lang.String[] orderedDefaultFiles, java.lang.String paramFileName)
paramFileName
- the file where parameters are savedorderedDefaultFiles
- DESCRIBE THE PARAMETER
java.io.IOException
public Environment(java.lang.String paramFileName)
paramFileName
- DESCRIBE THE PARAMETERpublic Environment()
Method Detail |
public SelectorManager getSelectorManager()
public Processor getProcessor()
public RandomSource getRandomSource()
public TimeSource getTimeSource()
public LogManager getLogManager()
public Parameters getParameters()
protected void chooseDefaults()
public void destroy()
destroy
in interface Destructable
public void addDestructable(Destructable destructable)
destructable
- The feature to be added to the Destructable attributepublic void removeDestructable(Destructable destructable)
destructable
- DESCRIBE THE PARAMETERpublic static Environment directEnvironment()
public static RandomSource generateDefaultRandomSource(Parameters params, LogManager logging)
params
- DESCRIBE THE PARAMETERlogging
- DESCRIBE THE PARAMETER
public static TimeSource generateDefaultTimeSource()
public static LogManager generateDefaultLogManager(TimeSource time, Parameters params)
time
- DESCRIBE THE PARAMETERparams
- DESCRIBE THE PARAMETER
public static SelectorManager generateDefaultSelectorManager(TimeSource time, LogManager logging)
time
- DESCRIBE THE PARAMETERlogging
- DESCRIBE THE PARAMETER
public static Processor generateDefaultProcessor()
|
Rice Pastry API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |