planet.util
Class Properties

java.lang.Object
  extended byplanet.util.Properties

public class Properties
extends java.lang.Object

This class loads all mandatory attributes of the specified properties file. The loading process follows these steps:

  1. Open the specified master properties file. This file contains the filename with the required attributes for the current simulation, under certain master key.
  2. Open the current properties file. Opens the properties file in a normal serialization (no XML) and loads all mandatory attributes and these followings optional parts:
Any other part must be explicitly activated with the related methods wich starts their names with activate...().

Author:
Jordi Pujol, Marc Sanchez 30-jun-2005

Field Summary
static java.lang.String BEHAVIOURS_FACTORY
          Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourFactory interface.
static java.lang.String BEHAVIOURS_FILTER
          Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourFilter interface.
static java.lang.String BEHAVIOURS_INVOKER
          Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourInvoker interface.
static java.lang.String BEHAVIOURS_NUMBEROFMODES
          Behaviours property: Default key specified in the properties file that identifies the number of message modes used in the current overlay.
static java.lang.String BEHAVIOURS_NUMBEROFTYPES
          Behaviours property: Default key specified in the properties file that identifies the number of message types used in the current overlay.
static java.lang.String BEHAVIOURS_PATTERN
          Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourPattern interface.
static java.lang.String BEHAVIOURS_POOL
          Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourPool interface.
static java.lang.String BEHAVIOURS_PROPERTIES
          Behaviours property: Default key specified in the properties file that identifies implementation class for PropertiesInitializer interface.
static java.lang.String BEHAVIOURS_ROLESELECTOR
          Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourRoleSelector interface.
static java.lang.Class behavioursFactory
          Behaviours property: Implementation class for BehaviourFactory interface.
static java.lang.Class behavioursFilter
          Behaviours property: Implementation class for BehaviourFilter interface.
static java.lang.Class behavioursInvoker
          Behaviours property: Implementation class for BehaviourInvoker interface.
static int behavioursNumberOfModes
          Behaviours property: Number of message modes used in the current overlay implementation.
static int behavioursNumberOfTypes
          Behaviours property: Number of message types used in the current overlay implementation.
static java.lang.Class behavioursPattern
          Behaviours property: Implementation class for BehaviourPattern interface.
static java.lang.Class behavioursPool
          Behaviours property: Implementation class for BehaviourPool interface.
static java.lang.Class behavioursProperties
          Behaviours property: Implementation class for the PropertiesInitializer interface.
static PropertiesInitializer behavioursPropertiesInstance
          Behaviours property: Instance of the implementation class for the PropertiesInitializer interface.
static java.lang.Class behavioursRoleSelector
          Behaviours property: Implementation class for BehaviourRoleSelector interface.
static java.lang.String FACTORIES_APPLICATION
          Factories property: Default key specified in the properties file that identifies implementation class for Application interface.
static java.lang.String FACTORIES_APPLICATIONFACTORY
          Factories property: The default ApplicationFactory key specified in the properties file.
static java.lang.String FACTORIES_ENDPOINT
          Factories property: Default key specified in the properties file that identifies implementation class for EndPoint interface.
static java.lang.String FACTORIES_ENDPOINTFACTORY
          Factories property: The default EndPointFactory key specified in the properties file.
static java.lang.String FACTORIES_IDFACTORY
          Factories property: The default IdFactory key specified in the properties file.
static java.lang.String FACTORIES_NETWORK
          Factories property: Default key specified in the properties file that identifies implementation class for Network interface.
static java.lang.String FACTORIES_NETWORKFACTORY
          Factories property: The default NetworkFactory key specified in the properties file.
static java.lang.String FACTORIES_NETWORKSIZE
          Factories property: Default key specified in the properties file that identifies the network size.
static java.lang.String FACTORIES_NETWORKTOPOLOGY
          Factories property: Default key specified in the properties file that identifies the network topology.
static java.lang.String FACTORIES_NODEFACTORY
          Factories property: The default NodeFactory key specified in the properties file.
static java.lang.String FACTORIES_NODEHANDLE
          Factories property: Default key specified in the properties file that identifies implementation class for NodeHandle interface.
static java.lang.String FACTORIES_NODEHANDLEFACTORY
          Factories property: The default NodeHandleFactory key specified in the properties file.
static java.lang.String FACTORIES_ROUTEMESSAGE
          Factories property: Default key specified in the properties file that identifies implementation class for RouteMessage interface.
static java.lang.String FACTORIES_ROUTEMESSAGEPOOL
          Factories property: The default RouteMessagePool key specified in the properties file.
static java.lang.Class factoriesApplication
          Factories property: The Application implementation to use in current simulation.
static java.lang.Class factoriesApplicationFactory
          Factories property: The ApplicationFactory implementation to use in current simulation.
static java.lang.Class factoriesEndPoint
          Factories property: The EndPoint implementation to use in current simulation.
static java.lang.Class factoriesEndPointFactory
          Factories property: The EndPointFactory implementation to use in current simulation.
static java.lang.Class factoriesIdFactory
          Factories property: The IdFactory implementation to use in current simulation.
static java.lang.Class factoriesNetwork
          Factories property: The Network implementation to use in current simulation.
static java.lang.Class factoriesNetworkFactory
          Factories property: The NetworkFactory implementation to use in current simulation.
static int factoriesNetworkSize
          Factories property: The network size (number of nodes) that must appear in the current simulation.
static java.lang.String factoriesNetworkTopology
          Factories property: The network topology for the current simulated overlay.
static java.lang.Class factoriesNodeFactory
          Factories property: The NodeFactory implementation to use in current simulation.
static java.lang.Class factoriesNodeHandle
          Factories property: The NodeHandle implementation to use in current simulation.
static java.lang.Class factoriesNodeHandleFactory
          Factories property: The NodeHandleFactory implementation to use in current simulation.
static java.lang.Class factoriesRouteMessage
          Factories property: The RouteMessage implementation to use in current simulation.
static java.lang.Class factoriesRouteMessagePool
          Factories property: The RouteMessagePool implementation to use in current simulation.
static java.lang.String OVERLAY_ID
          Overlay property: Default key specified in the properties file that identifies implementation class for Id interface.
static java.lang.String OVERLAY_NODE
          Overlay property: Default key specified in the properties file that identifies implementation class for Node interface.
static java.lang.String OVERLAY_PROPERTIES
          Overlay property: Default key specified in the properties file that identifies implementation class for OverlayProperties interface.
static java.lang.String OVERLAY_WITH_BEHAVIOURS
          Overlay property: Default key specified in the properties file that identifies if this overlay implementation uses behaviours.
static java.lang.Class overlayId
          Overlay property: Implementation class for Id interface.
static java.lang.Class overlayNode
          Overlay property: Implementation class for Node interface.
static java.lang.Class overlayProperties
          Overlay property: Implementation class for PropertiesInitializer interface.
static OverlayProperties overlayPropertiesInstance
          Overlay property: Instance of the implementation class for PropertiesInitializer interface for the current overlay.
static boolean overlayWithBehaviours
          Overlay property: Identifies if this overlay implementation uses behaviours.
static java.lang.String RESULTS_CONSTRAINT
          Results property: Default key specified in the properties file that identifies implementation class for ResultsConstraint interface.
static java.lang.String RESULTS_EDGE
          Results property: Default key specified in the properties file that identifies implementation class for ResultsEdge interface.
static java.lang.String RESULTS_FACTORY
          Results property: Default key specified in the properties file that identifies implementation class for ResultsFactory interface.
static java.lang.String RESULTS_GENERATOR
          Results property: Default key specified in the properties file that identifies implementation class for ResultsGenerator interface.
static java.lang.String RESULTS_PROPERTIES
          Results property: Default key specified in the properties file that identifies implementation class for PropertiesInitializer interface.
static java.lang.String RESULTS_UNIQUE_NAME
          Results property: Default key specified in the properties file that identifies the unique names for results types.
static java.util.Vector resultsConstraint
          Results property: Contains all Class intances for each Constraint implementation.
static java.util.Vector resultsEdge
          Results property: Contains all Class instances for each Edge implementation.
static java.util.Vector resultsFactory
          Results property: Contains all Class instances for each Factory implementation.
static java.util.Vector resultsGenerator
          Results property: Contains all Class instances for each Generator implementation.
static java.util.Vector resultsProperties
          Results property: Contains all Class instances for each PropertiesInitializer implementation.
static java.util.Vector resultsPropertiesInstance
          Results property: Contains all instances for each PropertiesInitializer implementation, once them have been built and initialized.
static java.util.TreeMap resultsUniqueName
          Results property: Contains (String,Integer) pairs, where the String is the unique name for a result type, and the Integer shows its position into the list of possible unique names.
static java.lang.String SERIALIZATION_INPUT_FILE
          Serialization property: Default key specified in the properties file that identifies serialized file that contains the network to be loaded.
static java.lang.String SERIALIZATION_OUTPUT_FILE
          Serialization property: Default key specified in the properties file that identifies filename to which serialize the final state.
static java.lang.String SERIALIZATION_REPLACE_OUTPUT_FILE
          Serialization property: Default key specified in the properties file that identifies if the output file must be replaced with new outputs.
static java.lang.String serializedInputFile
          Serialization property: Identifies the serialized file that contains the network to be loaded.
static java.lang.String serializedOutputFile
          Serialization property: Identifies filename to which serialize the final state.
static boolean serializedOutputFileReplaced
          Serialization property: Identifies if the output file must be replaced with new outputs.
static java.lang.String SIMULATOR_ENVIRONMENT
          Simulator property: Default key specified in the properties file that identifies the environment for the current simulation.
static java.lang.String SIMULATOR_EVENT_FILE
          Simulator property: Default key specified in the properties file that identifies the events filename to load.
static java.lang.String SIMULATOR_EXPERIMENTAL_ENVIRONMENT
          Simulator property: Specifies the Experimental environment, based on time (not on steps).
static int SIMULATOR_FULL_PRINT
          Simulator property: Specifies that permits the network.printNodes() invokation.
static java.lang.String SIMULATOR_LOG_LEVEL
          Simulator property: Default key specified in the properties file that identifies the log level.
static int SIMULATOR_NO_PRINT
          Simulator property: Specifies that the network will not be printed out.
static int SIMULATOR_PRETTY_PRINT
          Simulator property: Specifies that permits the network.prettyPrintNodes() invokation.
static java.lang.String SIMULATOR_PRINT_LEVEL
          Simulator property: Default key specified in the properties file that identifies the print level for whole network.
static java.lang.String SIMULATOR_PROCESSED_MESSAGES
          Simulator property: Default key specified in the properties file that identifies the message processing.
static java.lang.String SIMULATOR_QUEUE_SIZE
          Simulator property: Default key specified in the properties file that identifies the queue size.
static java.lang.String SIMULATOR_SIMULATION_ENVIRONMENT
          Simulator property: Specifies the Simulation environment, based on steps.
static java.lang.String SIMULATOR_SIMULATION_STEPS
          Simulator property: Default key specified in the properties file that identifies the number of stabilization steps for any node at join or leave.
static java.lang.String simulatorEnvironment
          Simulator property: Environment for the current simulation.
static java.lang.String simulatorEventFile
          Simulator property: The events filename to be loaded.
static int simulatorLogLevel
          Simulator property: Required log level in the current simulation.
static int simulatorPrintLevel
          Simulator property: Required print level for whole network.
static int simulatorProcessedMessages
          Simulator property: The maximum number of processed messages per step and node.
static int simulatorQueueSize
          Simulator property: The maximum queue size for the nodes.
static int simulatorSimulationSteps
          Simulator property: Stabilization steps to simulate for any node at join or leave.
 
Constructor Summary
Properties()
           
 
Method Summary
static void activateApplicationLevelAttributes()
          Loads all required attributes for be able to use the application level.
static void activateEventsAttributes()
          Permits the use of files with events to be loaded into the current simulation.
static void activateResultsAttributes()
          Loads all results types specified in the properties file.
static void activateSerializationAttributes()
          Permits the loading, saving process of a serialized network.
static java.lang.Class getResultsConstraint(java.lang.String resultsName)
          Gets the ResultsConstraint related to the resultsname.
static java.lang.Class getResultsEdge(java.lang.String resultsName)
          Gets the ResultsEdge related to the resultsname.
static java.lang.Class getResultsFactory(java.lang.String resultsName)
          Gets the ResultsFactory related to the resultsname.
static java.lang.Class getResultsGenerator(java.lang.String resultsName)
          Gets the ResultsGenerator related to the resultsname.
static java.lang.Class getResultsProperties(java.lang.String resultsName)
          Gets the properties class related to the resultsname.
static PropertiesInitializer getResultsPropertiesInstance(java.lang.String resultsName)
          Gets the properties instance related to the resultsname.
static void init(java.lang.String masterFilename, java.lang.String mainPropertyName)
          Initialize all required attributes for the current simulation.
static boolean isApplicationLevelActivated()
          Shows when the optional application level has been activated.
static boolean isEventsActivated()
          Shows when the optional events part has been activated.
static boolean isResultsActivated()
          Shows when the optional results part has been activated.
static boolean isSerializationActivated()
          Shows when the optional serialization has been activated.
static void postinit()
          Makes the postinitialization process for all requried PropertiesInitializers instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORIES_NETWORKFACTORY

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

See Also:
Constant Field Values

FACTORIES_IDFACTORY

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

See Also:
Constant Field Values

FACTORIES_NODEHANDLEFACTORY

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

See Also:
Constant Field Values

FACTORIES_NODEFACTORY

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

See Also:
Constant Field Values

FACTORIES_ROUTEMESSAGEPOOL

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

See Also:
Constant Field Values

FACTORIES_NETWORK

public static final java.lang.String FACTORIES_NETWORK
Factories property: Default key specified in the properties file that identifies implementation class for Network interface.

See Also:
Constant Field Values

FACTORIES_NODEHANDLE

public static final java.lang.String FACTORIES_NODEHANDLE
Factories property: Default key specified in the properties file that identifies implementation class for NodeHandle interface.

See Also:
Constant Field Values

FACTORIES_ROUTEMESSAGE

public static final java.lang.String FACTORIES_ROUTEMESSAGE
Factories property: Default key specified in the properties file that identifies implementation class for RouteMessage interface.

See Also:
Constant Field Values

FACTORIES_NETWORKTOPOLOGY

public static final java.lang.String FACTORIES_NETWORKTOPOLOGY
Factories property: Default key specified in the properties file that identifies the network topology.

See Also:
Constant Field Values

FACTORIES_NETWORKSIZE

public static final java.lang.String FACTORIES_NETWORKSIZE
Factories property: Default key specified in the properties file that identifies the network size.

See Also:
Constant Field Values

FACTORIES_APPLICATIONFACTORY

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

See Also:
Constant Field Values

FACTORIES_ENDPOINTFACTORY

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

See Also:
Constant Field Values

FACTORIES_APPLICATION

public static final java.lang.String FACTORIES_APPLICATION
Factories property: Default key specified in the properties file that identifies implementation class for Application interface.

See Also:
Constant Field Values

FACTORIES_ENDPOINT

public static final java.lang.String FACTORIES_ENDPOINT
Factories property: Default key specified in the properties file that identifies implementation class for EndPoint interface.

See Also:
Constant Field Values

SIMULATOR_SIMULATION_STEPS

public static final java.lang.String SIMULATOR_SIMULATION_STEPS
Simulator property: Default key specified in the properties file that identifies the number of stabilization steps for any node at join or leave.

See Also:
Constant Field Values

SIMULATOR_LOG_LEVEL

public static final java.lang.String SIMULATOR_LOG_LEVEL
Simulator property: Default key specified in the properties file that identifies the log level.

See Also:
Constant Field Values

SIMULATOR_PRINT_LEVEL

public static final java.lang.String SIMULATOR_PRINT_LEVEL
Simulator property: Default key specified in the properties file that identifies the print level for whole network.

See Also:
Constant Field Values

SIMULATOR_ENVIRONMENT

public static final java.lang.String SIMULATOR_ENVIRONMENT
Simulator property: Default key specified in the properties file that identifies the environment for the current simulation.

See Also:
Constant Field Values

SIMULATOR_QUEUE_SIZE

public static final java.lang.String SIMULATOR_QUEUE_SIZE
Simulator property: Default key specified in the properties file that identifies the queue size.

See Also:
Constant Field Values

SIMULATOR_PROCESSED_MESSAGES

public static final java.lang.String SIMULATOR_PROCESSED_MESSAGES
Simulator property: Default key specified in the properties file that identifies the message processing.

See Also:
Constant Field Values

SIMULATOR_EVENT_FILE

public static final java.lang.String SIMULATOR_EVENT_FILE
Simulator property: Default key specified in the properties file that identifies the events filename to load.

See Also:
Constant Field Values

SERIALIZATION_INPUT_FILE

public static final java.lang.String SERIALIZATION_INPUT_FILE
Serialization property: Default key specified in the properties file that identifies serialized file that contains the network to be loaded.

See Also:
Constant Field Values

SERIALIZATION_OUTPUT_FILE

public static final java.lang.String SERIALIZATION_OUTPUT_FILE
Serialization property: Default key specified in the properties file that identifies filename to which serialize the final state.

See Also:
Constant Field Values

SERIALIZATION_REPLACE_OUTPUT_FILE

public static final java.lang.String SERIALIZATION_REPLACE_OUTPUT_FILE
Serialization property: Default key specified in the properties file that identifies if the output file must be replaced with new outputs.

See Also:
Constant Field Values

BEHAVIOURS_FACTORY

public static final java.lang.String BEHAVIOURS_FACTORY
Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourFactory interface.

See Also:
Constant Field Values

BEHAVIOURS_POOL

public static final java.lang.String BEHAVIOURS_POOL
Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourPool interface.

See Also:
Constant Field Values

BEHAVIOURS_ROLESELECTOR

public static final java.lang.String BEHAVIOURS_ROLESELECTOR
Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourRoleSelector interface.

See Also:
Constant Field Values

BEHAVIOURS_INVOKER

public static final java.lang.String BEHAVIOURS_INVOKER
Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourInvoker interface.

See Also:
Constant Field Values

BEHAVIOURS_FILTER

public static final java.lang.String BEHAVIOURS_FILTER
Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourFilter interface.

See Also:
Constant Field Values

BEHAVIOURS_PATTERN

public static final java.lang.String BEHAVIOURS_PATTERN
Behaviours property: Default key specified in the properties file that identifies implementation class for BehaviourPattern interface.

See Also:
Constant Field Values

BEHAVIOURS_PROPERTIES

public static final java.lang.String BEHAVIOURS_PROPERTIES
Behaviours property: Default key specified in the properties file that identifies implementation class for PropertiesInitializer interface.

See Also:
Constant Field Values

BEHAVIOURS_NUMBEROFTYPES

public static final java.lang.String BEHAVIOURS_NUMBEROFTYPES
Behaviours property: Default key specified in the properties file that identifies the number of message types used in the current overlay.

See Also:
Constant Field Values

BEHAVIOURS_NUMBEROFMODES

public static final java.lang.String BEHAVIOURS_NUMBEROFMODES
Behaviours property: Default key specified in the properties file that identifies the number of message modes used in the current overlay.

See Also:
Constant Field Values

OVERLAY_ID

public static final java.lang.String OVERLAY_ID
Overlay property: Default key specified in the properties file that identifies implementation class for Id interface.

See Also:
Constant Field Values

OVERLAY_NODE

public static final java.lang.String OVERLAY_NODE
Overlay property: Default key specified in the properties file that identifies implementation class for Node interface.

See Also:
Constant Field Values

OVERLAY_PROPERTIES

public static final java.lang.String OVERLAY_PROPERTIES
Overlay property: Default key specified in the properties file that identifies implementation class for OverlayProperties interface.

See Also:
Constant Field Values

OVERLAY_WITH_BEHAVIOURS

public static final java.lang.String OVERLAY_WITH_BEHAVIOURS
Overlay property: Default key specified in the properties file that identifies if this overlay implementation uses behaviours.

See Also:
Constant Field Values

RESULTS_FACTORY

public static final java.lang.String RESULTS_FACTORY
Results property: Default key specified in the properties file that identifies implementation class for ResultsFactory interface.

See Also:
Constant Field Values

RESULTS_EDGE

public static final java.lang.String RESULTS_EDGE
Results property: Default key specified in the properties file that identifies implementation class for ResultsEdge interface.

See Also:
Constant Field Values

RESULTS_CONSTRAINT

public static final java.lang.String RESULTS_CONSTRAINT
Results property: Default key specified in the properties file that identifies implementation class for ResultsConstraint interface.

See Also:
Constant Field Values

RESULTS_GENERATOR

public static final java.lang.String RESULTS_GENERATOR
Results property: Default key specified in the properties file that identifies implementation class for ResultsGenerator interface.

See Also:
Constant Field Values

RESULTS_PROPERTIES

public static final java.lang.String RESULTS_PROPERTIES
Results property: Default key specified in the properties file that identifies implementation class for PropertiesInitializer interface.

See Also:
Constant Field Values

RESULTS_UNIQUE_NAME

public static final java.lang.String RESULTS_UNIQUE_NAME
Results property: Default key specified in the properties file that identifies the unique names for results types.

See Also:
Constant Field Values

factoriesNetworkFactory

public static java.lang.Class factoriesNetworkFactory
Factories property: The NetworkFactory implementation to use in current simulation.


factoriesIdFactory

public static java.lang.Class factoriesIdFactory
Factories property: The IdFactory implementation to use in current simulation.


factoriesNodeHandleFactory

public static java.lang.Class factoriesNodeHandleFactory
Factories property: The NodeHandleFactory implementation to use in current simulation.


factoriesNodeFactory

public static java.lang.Class factoriesNodeFactory
Factories property: The NodeFactory implementation to use in current simulation.


factoriesRouteMessagePool

public static java.lang.Class factoriesRouteMessagePool
Factories property: The RouteMessagePool implementation to use in current simulation.


factoriesNetwork

public static java.lang.Class factoriesNetwork
Factories property: The Network implementation to use in current simulation.


factoriesNodeHandle

public static java.lang.Class factoriesNodeHandle
Factories property: The NodeHandle implementation to use in current simulation.


factoriesRouteMessage

public static java.lang.Class factoriesRouteMessage
Factories property: The RouteMessage implementation to use in current simulation.


factoriesNetworkTopology

public static java.lang.String factoriesNetworkTopology
Factories property: The network topology for the current simulated overlay.


factoriesNetworkSize

public static int factoriesNetworkSize
Factories property: The network size (number of nodes) that must appear in the current simulation.


factoriesApplicationFactory

public static java.lang.Class factoriesApplicationFactory
Factories property: The ApplicationFactory implementation to use in current simulation.


factoriesEndPointFactory

public static java.lang.Class factoriesEndPointFactory
Factories property: The EndPointFactory implementation to use in current simulation.


factoriesApplication

public static java.lang.Class factoriesApplication
Factories property: The Application implementation to use in current simulation.


factoriesEndPoint

public static java.lang.Class factoriesEndPoint
Factories property: The EndPoint implementation to use in current simulation.


simulatorSimulationSteps

public static int simulatorSimulationSteps
Simulator property: Stabilization steps to simulate for any node at join or leave.


simulatorLogLevel

public static int simulatorLogLevel
Simulator property: Required log level in the current simulation.


simulatorPrintLevel

public static int simulatorPrintLevel
Simulator property: Required print level for whole network.


SIMULATOR_NO_PRINT

public static final int SIMULATOR_NO_PRINT
Simulator property: Specifies that the network will not be printed out.

See Also:
Constant Field Values

SIMULATOR_PRETTY_PRINT

public static final int SIMULATOR_PRETTY_PRINT
Simulator property: Specifies that permits the network.prettyPrintNodes() invokation.

See Also:
Constant Field Values

SIMULATOR_FULL_PRINT

public static final int SIMULATOR_FULL_PRINT
Simulator property: Specifies that permits the network.printNodes() invokation.

See Also:
Constant Field Values

simulatorEnvironment

public static java.lang.String simulatorEnvironment
Simulator property: Environment for the current simulation.


SIMULATOR_SIMULATION_ENVIRONMENT

public static final java.lang.String SIMULATOR_SIMULATION_ENVIRONMENT
Simulator property: Specifies the Simulation environment, based on steps.

See Also:
Constant Field Values

SIMULATOR_EXPERIMENTAL_ENVIRONMENT

public static final java.lang.String SIMULATOR_EXPERIMENTAL_ENVIRONMENT
Simulator property: Specifies the Experimental environment, based on time (not on steps).

See Also:
Constant Field Values

simulatorQueueSize

public static int simulatorQueueSize
Simulator property: The maximum queue size for the nodes.


simulatorProcessedMessages

public static int simulatorProcessedMessages
Simulator property: The maximum number of processed messages per step and node.


simulatorEventFile

public static java.lang.String simulatorEventFile
Simulator property: The events filename to be loaded.


serializedInputFile

public static java.lang.String serializedInputFile
Serialization property: Identifies the serialized file that contains the network to be loaded.


serializedOutputFile

public static java.lang.String serializedOutputFile
Serialization property: Identifies filename to which serialize the final state.


serializedOutputFileReplaced

public static boolean serializedOutputFileReplaced
Serialization property: Identifies if the output file must be replaced with new outputs.


behavioursFactory

public static java.lang.Class behavioursFactory
Behaviours property: Implementation class for BehaviourFactory interface.


behavioursPool

public static java.lang.Class behavioursPool
Behaviours property: Implementation class for BehaviourPool interface.


behavioursRoleSelector

public static java.lang.Class behavioursRoleSelector
Behaviours property: Implementation class for BehaviourRoleSelector interface.


behavioursInvoker

public static java.lang.Class behavioursInvoker
Behaviours property: Implementation class for BehaviourInvoker interface.


behavioursFilter

public static java.lang.Class behavioursFilter
Behaviours property: Implementation class for BehaviourFilter interface.


behavioursPattern

public static java.lang.Class behavioursPattern
Behaviours property: Implementation class for BehaviourPattern interface.


behavioursProperties

public static java.lang.Class behavioursProperties
Behaviours property: Implementation class for the PropertiesInitializer interface.


behavioursPropertiesInstance

public static PropertiesInitializer behavioursPropertiesInstance
Behaviours property: Instance of the implementation class for the PropertiesInitializer interface.


behavioursNumberOfTypes

public static int behavioursNumberOfTypes
Behaviours property: Number of message types used in the current overlay implementation.


behavioursNumberOfModes

public static int behavioursNumberOfModes
Behaviours property: Number of message modes used in the current overlay implementation.


overlayId

public static java.lang.Class overlayId
Overlay property: Implementation class for Id interface.


overlayNode

public static java.lang.Class overlayNode
Overlay property: Implementation class for Node interface.


overlayProperties

public static java.lang.Class overlayProperties
Overlay property: Implementation class for PropertiesInitializer interface.


overlayPropertiesInstance

public static OverlayProperties overlayPropertiesInstance
Overlay property: Instance of the implementation class for PropertiesInitializer interface for the current overlay.


overlayWithBehaviours

public static boolean overlayWithBehaviours
Overlay property: Identifies if this overlay implementation uses behaviours. If true, the behaviours properties must be loaded successfully before the begining of the simulation.


resultsFactory

public static java.util.Vector resultsFactory
Results property: Contains all Class instances for each Factory implementation. These instances appear in the same order than in file.


resultsEdge

public static java.util.Vector resultsEdge
Results property: Contains all Class instances for each Edge implementation. These instances appear in the same order than in file.


resultsConstraint

public static java.util.Vector resultsConstraint
Results property: Contains all Class intances for each Constraint implementation. These instances appear in the same order than in file.


resultsGenerator

public static java.util.Vector resultsGenerator
Results property: Contains all Class instances for each Generator implementation. These instances appear in the same order than in file.


resultsProperties

public static java.util.Vector resultsProperties
Results property: Contains all Class instances for each PropertiesInitializer implementation. These instances appear in the same order than in file.


resultsPropertiesInstance

public static java.util.Vector resultsPropertiesInstance
Results property: Contains all instances for each PropertiesInitializer implementation, once them have been built and initialized. These instances appear in the same order than their specification in file.


resultsUniqueName

public static java.util.TreeMap resultsUniqueName
Results property: Contains (String,Integer) pairs, where the String is the unique name for a result type, and the Integer shows its position into the list of possible unique names.

Constructor Detail

Properties

public Properties()
Method Detail

init

public static void init(java.lang.String masterFilename,
                        java.lang.String mainPropertyName)
                 throws InitializationException
Initialize all required attributes for the current simulation. If the overlay uses behaviours, these attributes also are loaded. If you want to use other test dependant attributes, you have to activate them individually. After this method invokation all optional fields must be activated explicitly.

Parameters:
masterFilename - Filename that contains the file specification that have all required attributes for the current simulation.
mainPropertyName - The key that appears into the masterFilename with the final filename with required configuration.
Throws:
InitializationException - if any error has ocurred during the initialization.
See Also:
activateApplicationLevelAttributes(), activateEventsAttributes(), activateSerializationAttributes(), activateResultsAttributes()

postinit

public static void postinit()
                     throws InitializationException
Makes the postinitialization process for all requried PropertiesInitializers instances.

Throws:
InitializationException - if an error occurs during the initialization of the different properties.
See Also:
PropertiesInitializer.postinit(planet.util.PropertiesWrapper)

activateApplicationLevelAttributes

public static void activateApplicationLevelAttributes()
                                               throws InitializationException
Loads all required attributes for be able to use the application level.

Throws:
InitializationException - if cannot load any required attribute.

activateEventsAttributes

public static void activateEventsAttributes()
                                     throws InitializationException
Permits the use of files with events to be loaded into the current simulation.

Throws:
InitializationException - if any error has ocurred during the loading process.

activateSerializationAttributes

public static void activateSerializationAttributes()
                                            throws InitializationException
Permits the loading, saving process of a serialized network. A loaded serialized network can be used for the current simulation without any other cost (without its creation and stabilization processes). You can save the current simulation state to use it in the future wihtout any other cost.

Throws:
InitializationException - if any error has ocurred during the loading process.

activateResultsAttributes

public static void activateResultsAttributes()
                                      throws InitializationException
Loads all results types specified in the properties file.

Throws:
InitializationException - if any error occurs during the loading process.

getResultsFactory

public static java.lang.Class getResultsFactory(java.lang.String resultsName)
                                         throws InitializationException
Gets the ResultsFactory related to the resultsname.

Parameters:
resultsName - Results name, appeared in the configuration file.
Returns:
The requrested ResultsFactory.
Throws:
InitializationException - if some error occurs during the obtaining process.

getResultsConstraint

public static java.lang.Class getResultsConstraint(java.lang.String resultsName)
                                            throws InitializationException
Gets the ResultsConstraint related to the resultsname.

Parameters:
resultsName - Results name, appeared in the configuration file.
Returns:
The requrested ResultsConstraint.
Throws:
InitializationException - if some error occurs during the obtaining process.

getResultsEdge

public static java.lang.Class getResultsEdge(java.lang.String resultsName)
                                      throws InitializationException
Gets the ResultsEdge related to the resultsname.

Parameters:
resultsName - Results name, appeared in the configuration file.
Returns:
The requrested ResultsEdge.
Throws:
InitializationException - if some error occurs during the obtaining process.

getResultsGenerator

public static java.lang.Class getResultsGenerator(java.lang.String resultsName)
                                           throws InitializationException
Gets the ResultsGenerator related to the resultsname.

Parameters:
resultsName - Results name, appeared in the configuration file.
Returns:
The requrested ResultsGenerator.
Throws:
InitializationException - if some error occurs during the obtaining process.

getResultsProperties

public static java.lang.Class getResultsProperties(java.lang.String resultsName)
                                            throws InitializationException
Gets the properties class related to the resultsname.

Parameters:
resultsName - Results name, appeared in the configuration file.
Returns:
The requested properties.
Throws:
InitializationException - if some error occurs during the obtaining process.

getResultsPropertiesInstance

public static PropertiesInitializer getResultsPropertiesInstance(java.lang.String resultsName)
                                                          throws InitializationException
Gets the properties instance related to the resultsname.

Parameters:
resultsName - Results name, appeared in the configuration file.
Returns:
The requested properties instance.
Throws:
InitializationException - if some error occurs during the obtaining process.

isApplicationLevelActivated

public static boolean isApplicationLevelActivated()
Shows when the optional application level has been activated.

Returns:
true when it is activated. false in other case.

isEventsActivated

public static boolean isEventsActivated()
Shows when the optional events part has been activated.

Returns:
true when it is activated. false in other case.

isSerializationActivated

public static boolean isSerializationActivated()
Shows when the optional serialization has been activated.

Returns:
true when it is activated. false in other case.

isResultsActivated

public static boolean isResultsActivated()
Shows when the optional results part has been activated.

Returns:
true when it is activated. false in other case.