|
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
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,
ExceptionStrategy strategy)
Constructor. |
|
Environment(java.lang.String paramFileName)
|
|
Environment(java.lang.String[] orderedDefaultFiles,
java.lang.String paramFileName)
Convienience for defaults. |
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, ExceptionStrategy strategy)
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(int randomSeed)
public static Environment directEnvironment()
public static Environment directEnvironment(RandomSource rs)
protected void chooseDefaults()
public static ExceptionStrategy generateDefaultExceptionStrategy()
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)
public ExceptionStrategy getExceptionStrategy()
public ExceptionStrategy setExceptionStrategy(ExceptionStrategy newStrategy)
|
Rice Pastry API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |