|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rice.environment.Environment
public class 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
|
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)
|
|
Environment(java.lang.String[] orderedDefaultFiles,
java.lang.String paramFileName)
Convienience for defaults. |
Method Summary | |
---|---|
void |
addDestructable(Destructable destructable)
|
protected void |
chooseDefaults()
Can be easily overridden by a subclass. |
void |
destroy()
Tears down the environment. |
static Environment |
directEnvironment()
|
static LogManager |
generateDefaultLogManager(TimeSource time,
Parameters params)
|
static Processor |
generateDefaultProcessor()
|
static RandomSource |
generateDefaultRandomSource(Parameters params,
LogManager logging)
|
static SelectorManager |
generateDefaultSelectorManager(TimeSource time,
LogManager logging)
|
static TimeSource |
generateDefaultTimeSource()
|
LogManager |
getLogManager()
|
Parameters |
getParameters()
|
Processor |
getProcessor()
|
RandomSource |
getRandomSource()
|
SelectorManager |
getSelectorManager()
|
TimeSource |
getTimeSource()
|
void |
removeDestructable(Destructable destructable)
|
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.SimpleLogManagerprops
- the Properties. Default: empty propertiespublic Environment(java.lang.String[] orderedDefaultFiles, java.lang.String paramFileName)
paramFileName
- the file where parameters are saved
java.io.IOException
public Environment(java.lang.String paramFileName)
public Environment()
Method Detail |
---|
public static Environment directEnvironment()
protected void chooseDefaults()
public static RandomSource generateDefaultRandomSource(Parameters params, LogManager logging)
public static TimeSource generateDefaultTimeSource()
public static LogManager generateDefaultLogManager(TimeSource time, Parameters params)
public static SelectorManager generateDefaultSelectorManager(TimeSource time, LogManager logging)
public static Processor generateDefaultProcessor()
public SelectorManager getSelectorManager()
public Processor getProcessor()
public RandomSource getRandomSource()
public TimeSource getTimeSource()
public LogManager getLogManager()
public Parameters getParameters()
public void destroy()
destroy
in interface Destructable
public void addDestructable(Destructable destructable)
public void removeDestructable(Destructable destructable)
|
ePOST API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |