📄 properties.java
字号:
public static Class factoriesRouteMessagePool = null;
/* Specific classes: */
/**
* Factories property: The Network implementation to use in current simulation.
*/
public static Class factoriesNetwork = null;
/**
* Factories property: The NodeHandle implementation to use in current simulation.
*/
public static Class factoriesNodeHandle = null;
/**
* Factories property: The RouteMessage implementation to use in current simulation.
*/
public static Class factoriesRouteMessage = null;
/**
* Factories property: The network topology for the current simulated overlay.
*/
public static String factoriesNetworkTopology = null;
/**
* Factories property: The network size (number of nodes) that must appear
* in the current simulation.
*/
public static int factoriesNetworkSize = 0;
/* OPTIONAL ATTRIBUTES */
/* Factories: */
/**
* Factories property: The ApplicationFactory implementation to use in current simulation.
*/
public static Class factoriesApplicationFactory = null;
/**
* Factories property: The EndPointFactory implementation to use in current simulation.
*/
public static Class factoriesEndPointFactory = null;
/* Specific classes: */
/**
* Factories property: The Application implementation to use in current simulation.
*/
public static Class factoriesApplication = null;
/**
* Factories property: The EndPoint implementation to use in current simulation.
*/
public static Class factoriesEndPoint = null;
/* *********************** SIMULATOR PROPERTIES NAMES ***********************/
/* REQUIRED */
/**
* Simulator property: Stabilization steps to simulate for any node at join
* or leave.
*/
public static int simulatorSimulationSteps = 0;
/**
* Simulator property: Required log level in the current simulation.
*/
public static int simulatorLogLevel = 0;
/**
* Simulator property: Required print level for whole network.
*/
public static int simulatorPrintLevel = 0;
/**
* Simulator property: Specifies that the network will not be printed out.
*/
public static final int SIMULATOR_NO_PRINT = 0;
/**
* Simulator property: Specifies that permits the network.prettyPrintNodes() invokation.
*/
public static final int SIMULATOR_PRETTY_PRINT = 1;
/**
* Simulator property: Specifies that permits the network.printNodes() invokation.
*/
public static final int SIMULATOR_FULL_PRINT = 2;
/**
* Simulator property: Environment for the current simulation.
*/
public static String simulatorEnvironment = null;
/**
* Simulator property: Specifies the Simulation environment, based on steps.
*/
public static final String SIMULATOR_SIMULATION_ENVIRONMENT = "SIMULATION";
/**
* Simulator property: Specifies the Experimental environment, based on time
* (not on steps).
*/
public static final String SIMULATOR_EXPERIMENTAL_ENVIRONMENT = "EXPERIMENTAL";
/**
* Simulator property: The maximum queue size for the nodes.
*/
public static int simulatorQueueSize = 0;
/**
* Simulator property: The maximum number of processed messages per step and
* node.
*/
public static int simulatorProcessedMessages = 0;
/* OPTIONAL */
/**
* Simulator property: The events filename to be loaded.
*/
public static String simulatorEventFile = null;
/* *********************** SERIALIZATION PROPERTIES NAMES ***********************/
/* Test dependant: All these attributes are optionals */
/**
* Serialization property: Identifies the serialized file that contains the
* network to be loaded.
*/
public static String serializedInputFile = null;
/**
* Serialization property: Identifies filename to which serialize the final
* state.
*/
public static String serializedOutputFile = null;
/**
* Serialization property: Identifies if the output file must be replaced
* with new outputs.
*/
public static boolean serializedOutputFileReplaced = true;
/* *********************** BEHAVIOURS PROPERTIES NAMES ***********************/
/* Overlay dependant: All these attributes are optionals */
/**
* Behaviours property: Implementation class for BehaviourFactory interface.
*/
public static Class behavioursFactory = null;
/**
* Behaviours property: Implementation class for BehaviourPool interface.
*/
public static Class behavioursPool = null;
/**
* Behaviours property: Implementation class for BehaviourRoleSelector interface.
*/
public static Class behavioursRoleSelector = null;
/**
* Behaviours property: Implementation class for BehaviourInvoker interface.
*/
public static Class behavioursInvoker = null;
/**
* Behaviours property: Implementation class for BehaviourFilter interface.
*/
public static Class behavioursFilter = null;
/**
* Behaviours property: Implementation class for BehaviourPattern interface.
*/
public static Class behavioursPattern = null;
/**
* Behaviours property: Implementation class for the PropertiesInitializer interface.
*/
public static Class behavioursProperties = null;
/**
* Behaviours property: Instance of the implementation class for the
* PropertiesInitializer interface.
*/
public static PropertiesInitializer behavioursPropertiesInstance = null;
/**
* Behaviours property: Number of message types used in the current
* overlay implementation.
*/
public static int behavioursNumberOfTypes = 0;
/**
* Behaviours property: Number of message modes used in the current
* overlay implementation.
*/
public static int behavioursNumberOfModes = 0;
/* *********************** OVERLAY PROPERTIES NAMES ***********************/
/* Required: */
/**
* Overlay property: Implementation class for Id interface.
*/
public static Class overlayId = null;
/**
* Overlay property: Implementation class for Node interface.
*/
public static Class overlayNode = null;
/**
* Overlay property: Implementation class for PropertiesInitializer interface.
*/
public static Class overlayProperties = null;
/**
* Overlay property: Instance of the implementation class for
* PropertiesInitializer interface for the current overlay.
*/
public static OverlayProperties overlayPropertiesInstance = null;
/**
* Overlay property: Identifies if this overlay implementation uses
* behaviours. If true, the behaviours properties must be loaded successfully
* before the begining of the simulation.
*/
public static boolean overlayWithBehaviours = false;
/* *********************** RESULTS PROPERTIES NAMES ***********************/
/* Test dependant: All these attributes are optionals */
/**
* Results property: Contains all Class instances for each Factory implementation.
* These instances appear in the same order than in file.
*/
public static Vector resultsFactory = null;
/**
* Results property: Contains all Class instances for each Edge implementation.
* These instances appear in the same order than in file.
*/
public static Vector resultsEdge = null;
/**
* Results property: Contains all Class intances for each Constraint implementation.
* These instances appear in the same order than in file.
*/
public static Vector resultsConstraint = null;
/**
* Results property: Contains all Class instances for each Generator implementation.
* These instances appear in the same order than in file.
*/
public static Vector resultsGenerator = null;
/**
* Results property: Contains all Class instances for each PropertiesInitializer implementation.
* These instances appear in the same order than in file.
*/
public static Vector resultsProperties = null;
/**
* 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.
*/
public static Vector resultsPropertiesInstance = null;
/**
* 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.
*/
public static TreeMap resultsUniqueName = null;
/* ****************************** INTERNAL PROPERTIES *********************/
/**
* Internal property: To contain all attributes loaded from the external file.
*/
private static PropertiesWrapper properties = null;
/**
* Internal property: Shows when the applicaton level has been activated.
*/
private static boolean activatedApplicationLevel = false;
/**
* Internal property: Shows when the netwokr building by events has been activated.
*/
private static boolean activatedEvents = false;
/**
* Internal property: Shows when the serialization has been activated.
*/
private static boolean activatedSerialization = false;
/**
* Internal property: Shows when the results have been activated.
*/
private static boolean activatedResults = false;
/**
* Internal property: Class array for temporal uses in implementedInterface
* method.
*/
private static Class[] implementedInterfaceTemp = null;
////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* 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.
* @param masterFilename Filename that contains the file specification
* that have all required attributes for the current simulation.
* @param mainPropertyName The key that appears into the <b>masterFilename</b>
* with the final filename with required configuration.
* @throws InitializationException if any error has ocurred during the
* initialization.
* @see Properties#activateApplicationLevelAttributes()
* @see Properties#activateEventsAttributes()
* @see Properties#activateSerializationAttributes()
* @see Properties#activateResultsAttributes()
*/
public static void init(String masterFilename, String mainPropertyName) throws InitializationException
{
resetAttributes();
properties = loadProperties(masterFilename, mainPropertyName);
loadFactoriesAttributes();
loadSimulatorAttributes();
loadOverlayAttributes();
if (Properties.overlayWithBehaviours)
loadBehavioursAttributes();
}
/**
* Makes the postinitialization process for all requried PropertiesInitializers instances.
* @throws InitializationException if an error occurs during
* the initialization of the different properties.
* @see planet.util.PropertiesInitializer#postinit(planet.util.PropertiesWrapper)
*/
public static void postinit() throws InitializationException
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -