planet.util
Class Properties

java.lang.Object
  extended byplanet.util.Properties

public class Properties
extends java.lang.Object

Author:
Jordi Pujol

Field Summary
static java.lang.Class appClass
          Class of Application implementation.
static int bitsKey
          Number of bits for Id.
static java.lang.String DEFAULT_APPLICATION
          Factories property: The default key specified in the properties file that identifies the class of some Application's implementation.
static java.lang.String DEFAULT_BITS_KEY
          Factories property: Default key at properties file that identifies the number of bits of the key.
static java.lang.String DEFAULT_CHORD_PROPERTIES
          Default file which contains the defualt properties for the Chord protocol.
static java.lang.String DEFAULT_END_POINT
          Factories property: Default key at properties file that identifies the class for new EndPoints.
static java.lang.String DEFAULT_EVENT_FILE
          Simulator property: Default key for filename with events to load.
static java.lang.String DEFAULT_FACTORY_PROPERTIES
          Default file which contains the default properties for the factories.
static java.lang.String DEFAULT_ID_CLASS
          Factories property: The default Class for Ids specified in the properties file.
static java.lang.String DEFAULT_IDFACTORY
          Factories property: The default IdFactory key specified in the properties file.
static java.lang.String DEFAULT_LOG_LEVEL
          Simulator property: Default key for log level.
static java.lang.String DEFAULT_MSG_PROCESS
          Chord property: Default key for message processig.
static java.lang.String DEFAULT_NETWORK
          Factories property: The default key specified in the properties file that identifies the class of the network implementation to use.
static java.lang.String DEFAULT_NETWORK_SIZE
          Factories property: Default key at properties file that identifies the network size.
static java.lang.String DEFAULT_NODE_FACTORY
          Factories property: Default key at properties file that identifies the NodeFactory.
static java.lang.String DEFAULT_NODECLASS
          Factories property: The default Class for Nodes specified in the properties file.
static java.lang.String DEFAULT_NODEHANDLECLASS
          Factories property: The default Class for NodeHandles specified in the properties file.
static java.lang.String DEFAULT_OUTPUT_FILE
          Simulator property: Default key for filename to which serialize the final state.
static java.lang.String DEFAULT_OVERLAY_PROPERTIES
          Simulator property: Default key for the overlay properties class.
static java.lang.String DEFAULT_QUEUE_SIZE
          Chord property: Default key for queue size.
static java.lang.String DEFAULT_REPLACE_OUTPUT_FILE
          Simulator property: Default key to show if the output file must be replaced with new outputs.
static java.lang.String DEFAULT_ROUTE_MESSAGE
          Factories property: Default key at properties file that identifies the class for new RouteMessage.
static java.lang.String DEFAULT_SERIALIZED_FILE
          Factories property: Default key at properties file that identifies the serialized file that contains the state to load.
static java.lang.String DEFAULT_SIM_PROPERTIES
          Default file which contains the default properties for the simulator.
static java.lang.String DEFAULT_SIMULATION_STEPS
          Simulator property: Default key for number of stabilization steps for any node join or leave.
static java.lang.String DEFAULT_TIMER
          Simulator property: Default key for Timer class to use at nodes.
static java.lang.String DEFAULT_TOPOLOGY
          Factories property: Default key at properties file that identifies the topology of the network.
static java.lang.Class endPoint
          Implementation of EndPoint interface.
static java.lang.String eventFile
          Filename to use to load events to the simulator.
static java.lang.Class idClass
          Id class.
static java.lang.Class idFactory
          IdFactory implementation class.
static int logLevel
          Log level during simulation..
static int msgProcess
          Message processing.
static java.lang.Class networkClass
          Class of Network implementation.
static int networkSize
          Network size to build.
static java.lang.Class nodeClass
          Node implementation class.
static java.lang.Class nodeFactClass
          NodeFactory implementation class.
static java.lang.Class nodeHandleClass
          NodeHandle implementation class.
static java.lang.String outputFile
          Filename to use to save the actual state by serialization.
static java.lang.Class overlayPropertiesClass
          Class with all overlay properties.
static OverlayProperties overlayProps
          This contains all properties for the concrete overlay.
static int queueSize
          Size of message queues.
static boolean replaceOutputFile
          Flag to show if the output file must be replaced or not.
static java.lang.Class routeMessage
          Class that implements RouteMessage interface.
static java.lang.String serializedFile
          Filename to use to load some serialized state.
static int simulationSteps
          Number of steps to be runned after any node join or leave.
static java.lang.Class timerClass
          Class to use for Timers at nodes.
static java.lang.String topology
          Topology of the target network.
 
Constructor Summary
Properties()
           
 
Method Summary
static void init(java.lang.String factoryProperties, java.lang.String simProperties, java.lang.String overlayProperties)
          Load all properties for factories, simulator and chord, from the specified files, respectively.
static void initFactories(java.lang.String filename)
          Initializa all attributes for factories.
static void initSimulator(java.lang.String filename)
          Load all properties for the simulator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FACTORY_PROPERTIES

public static final java.lang.String DEFAULT_FACTORY_PROPERTIES
Default file which contains the default properties for the factories.

See Also:
Constant Field Values

DEFAULT_SIM_PROPERTIES

public static final java.lang.String DEFAULT_SIM_PROPERTIES
Default file which contains the default properties for the simulator.

See Also:
Constant Field Values

DEFAULT_CHORD_PROPERTIES

public static final java.lang.String DEFAULT_CHORD_PROPERTIES
Default file which contains the defualt properties for the Chord protocol.

See Also:
Constant Field Values

DEFAULT_NETWORK

public static final java.lang.String DEFAULT_NETWORK
Factories property: The default key specified in the properties file that identifies the class of the network implementation to use.

See Also:
Constant Field Values

DEFAULT_APPLICATION

public static final java.lang.String DEFAULT_APPLICATION
Factories property: The default key specified in the properties file that identifies the class of some Application's implementation.

See Also:
Constant Field Values

DEFAULT_ID_CLASS

public static final java.lang.String DEFAULT_ID_CLASS
Factories property: The default Class for Ids specified in the properties file.

See Also:
Constant Field Values

DEFAULT_IDFACTORY

public static final java.lang.String DEFAULT_IDFACTORY
Factories property: The default IdFactory key specified in the properties file.

See Also:
Constant Field Values

DEFAULT_NODECLASS

public static final java.lang.String DEFAULT_NODECLASS
Factories property: The default Class for Nodes specified in the properties file.

See Also:
Constant Field Values

DEFAULT_NODEHANDLECLASS

public static final java.lang.String DEFAULT_NODEHANDLECLASS
Factories property: The default Class for NodeHandles specified in the properties file.

See Also:
Constant Field Values

DEFAULT_NODE_FACTORY

public static final java.lang.String DEFAULT_NODE_FACTORY
Factories property: Default key at properties file that identifies the NodeFactory.

See Also:
Constant Field Values

DEFAULT_NETWORK_SIZE

public static final java.lang.String DEFAULT_NETWORK_SIZE
Factories property: Default key at properties file that identifies the network size.

See Also:
Constant Field Values

DEFAULT_BITS_KEY

public static final java.lang.String DEFAULT_BITS_KEY
Factories property: Default key at properties file that identifies the number of bits of the key.

See Also:
Constant Field Values

DEFAULT_SERIALIZED_FILE

public static final java.lang.String DEFAULT_SERIALIZED_FILE
Factories property: Default key at properties file that identifies the serialized file that contains the state to load.

See Also:
Constant Field Values

DEFAULT_TOPOLOGY

public static final java.lang.String DEFAULT_TOPOLOGY
Factories property: Default key at properties file that identifies the topology of the network.

See Also:
Constant Field Values

DEFAULT_ROUTE_MESSAGE

public static final java.lang.String DEFAULT_ROUTE_MESSAGE
Factories property: Default key at properties file that identifies the class for new RouteMessage.

See Also:
Constant Field Values

DEFAULT_END_POINT

public static final java.lang.String DEFAULT_END_POINT
Factories property: Default key at properties file that identifies the class for new EndPoints.

See Also:
Constant Field Values

DEFAULT_EVENT_FILE

public static final java.lang.String DEFAULT_EVENT_FILE
Simulator property: Default key for filename with events to load.

See Also:
Constant Field Values

DEFAULT_SIMULATION_STEPS

public static final java.lang.String DEFAULT_SIMULATION_STEPS
Simulator property: Default key for number of stabilization steps for any node join or leave.

See Also:
Constant Field Values

DEFAULT_LOG_LEVEL

public static final java.lang.String DEFAULT_LOG_LEVEL
Simulator property: Default key for log level.

See Also:
Constant Field Values

DEFAULT_OUTPUT_FILE

public static final java.lang.String DEFAULT_OUTPUT_FILE
Simulator property: Default key for filename to which serialize the final state.

See Also:
Constant Field Values

DEFAULT_REPLACE_OUTPUT_FILE

public static final java.lang.String DEFAULT_REPLACE_OUTPUT_FILE
Simulator property: Default key to show if the output file must be replaced with new outputs.

See Also:
Constant Field Values

DEFAULT_TIMER

public static final java.lang.String DEFAULT_TIMER
Simulator property: Default key for Timer class to use at nodes.

See Also:
Constant Field Values

DEFAULT_OVERLAY_PROPERTIES

public static final java.lang.String DEFAULT_OVERLAY_PROPERTIES
Simulator property: Default key for the overlay properties class.

See Also:
Constant Field Values

DEFAULT_QUEUE_SIZE

public static final java.lang.String DEFAULT_QUEUE_SIZE
Chord property: Default key for queue size.

See Also:
Constant Field Values

DEFAULT_MSG_PROCESS

public static final java.lang.String DEFAULT_MSG_PROCESS
Chord property: Default key for message processig.

See Also:
Constant Field Values

networkClass

public static java.lang.Class networkClass
Class of Network implementation.


appClass

public static java.lang.Class appClass
Class of Application implementation.


topology

public static java.lang.String topology
Topology of the target network.


idClass

public static java.lang.Class idClass
Id class.


networkSize

public static int networkSize
Network size to build.


nodeFactClass

public static java.lang.Class nodeFactClass
NodeFactory implementation class.


idFactory

public static java.lang.Class idFactory
IdFactory implementation class.


nodeClass

public static java.lang.Class nodeClass
Node implementation class.


nodeHandleClass

public static java.lang.Class nodeHandleClass
NodeHandle implementation class.


bitsKey

public static int bitsKey
Number of bits for Id.


serializedFile

public static java.lang.String serializedFile
Filename to use to load some serialized state.


routeMessage

public static java.lang.Class routeMessage
Class that implements RouteMessage interface.


endPoint

public static java.lang.Class endPoint
Implementation of EndPoint interface.


eventFile

public static java.lang.String eventFile
Filename to use to load events to the simulator.


simulationSteps

public static int simulationSteps
Number of steps to be runned after any node join or leave.


logLevel

public static int logLevel
Log level during simulation..


outputFile

public static java.lang.String outputFile
Filename to use to save the actual state by serialization.


replaceOutputFile

public static boolean replaceOutputFile
Flag to show if the output file must be replaced or not.


timerClass

public static java.lang.Class timerClass
Class to use for Timers at nodes.


overlayPropertiesClass

public static java.lang.Class overlayPropertiesClass
Class with all overlay properties.


queueSize

public static int queueSize
Size of message queues.


msgProcess

public static int msgProcess
Message processing.


overlayProps

public static OverlayProperties overlayProps
This contains all properties for the concrete overlay.

Constructor Detail

Properties

public Properties()
Method Detail

init

public static void init(java.lang.String factoryProperties,
                        java.lang.String simProperties,
                        java.lang.String overlayProperties)
                 throws InitializationException
Load all properties for factories, simulator and chord, from the specified files, respectively.

Parameters:
factoryProperties - File that contains the factories properties.
simProperties - File that contains the simulator properties.
overlayProperties - File that contains the overlay properties.
Throws:
InitializationException - if some error occur during initialization.

initFactories

public static void initFactories(java.lang.String filename)
                          throws InitializationException
Initializa all attributes for factories.

Parameters:
filename - File which contains all properties for the factories.
Throws:
InitializationException - if occur some error during initialization.

initSimulator

public static void initSimulator(java.lang.String filename)
                          throws InitializationException
Load all properties for the simulator.

Parameters:
filename - File that contains all properties for simulator.
Throws:
InitializationException - if occur some error during initialization.