Class ProtocolParameterReader
java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.diffusion.protocol.ProtocolParameterReader
public class ProtocolParameterReader extends ParametersReader
Reads the parameters for diffusion protocols.
-
Field Summary
Fields Modifier and Type Field Description private ExpirationParameterReaderexpirationIn case the protocol is custom, the expiration mechanismprivate static java.lang.StringEXPIRATIONIdentifier for the expiration mechanismprivate java.lang.StringnameProtocol nameprivate static java.lang.StringNAMEIdentifier for the name of the protocolprivate ParametersparamsIn case the protocol is preconfigured, its parametersprivate static java.lang.StringPARAMSIdentifier for the parameters of the protocolprivate booleanpreconfiguredIndicates if the protocol is custom or preconfiguredprivate PropagationParameterReaderpropagationIn case the protocol is custom, the propagation mechanismprivate static java.lang.StringPROPAGATIONIdentifier for the propagation mechanismprivate SelectionParameterReaderselectionIn case the protocol is custom, the protocol mechanismprivate static java.lang.StringSELECTIONIdentifier for the protocol mechanismprivate SightParameterReadersightIn case the protocol is custom, the sight mechanismprivate static java.lang.StringSIGHTIdentifier for the sight mechanismprivate static java.lang.StringTYPEIdentifier for the type of the protocolprivate UpdateParameterReaderupdateIn case the protocol is custom, the update mechanismprivate static java.lang.StringUPDATEIdentifier for the update mechanism -
Constructor Summary
Constructors Constructor Description ProtocolParameterReader() -
Method Summary
Modifier and Type Method Description ExpirationParameterReadergetExpiration()Obtains the parameters for the expiration mechanism.java.lang.StringgetName()Obtains the name of the protocol.ParametersgetParams()Obtains the parameters for the preconfigured protocol.PropagationParameterReadergetPropagation()Obtains the parameters for the propagation mechanism.SelectionParameterReadergetSelection()Obtains the parameters for the protocol mechanism.SightParameterReadergetSight()Obtains the parameters for the sight mechanism.UpdateParameterReadergetUpdate()Obtains the parameters for the update mechanism.booleanisPreconfigured()Indicates if the protocol is preconfigured or custom.java.lang.StringprintProtocol()Shows the configuration of a protocol.voidreadProtocol(java.util.Map<java.lang.String,java.lang.Object> protocol)Reads a protocol from an XML.Methods inherited from class es.uam.eps.ir.relison.grid.ParametersReader
readBoolean, readDouble, readInteger, readLong, readOrientation, readParameters, readParameterValues, readString
-
Field Details
-
name
private java.lang.String nameProtocol name -
params
In case the protocol is preconfigured, its parameters -
selection
In case the protocol is custom, the protocol mechanism -
expiration
In case the protocol is custom, the expiration mechanism -
update
In case the protocol is custom, the update mechanism -
propagation
In case the protocol is custom, the propagation mechanism -
sight
In case the protocol is custom, the sight mechanism -
preconfigured
private boolean preconfiguredIndicates if the protocol is custom or preconfigured -
NAME
private static final java.lang.String NAMEIdentifier for the name of the protocol- See Also:
- Constant Field Values
-
TYPE
private static final java.lang.String TYPEIdentifier for the type of the protocol- See Also:
- Constant Field Values
-
PARAMS
private static final java.lang.String PARAMSIdentifier for the parameters of the protocol- See Also:
- Constant Field Values
-
SELECTION
private static final java.lang.String SELECTIONIdentifier for the protocol mechanism- See Also:
- Constant Field Values
-
EXPIRATION
private static final java.lang.String EXPIRATIONIdentifier for the expiration mechanism- See Also:
- Constant Field Values
-
UPDATE
private static final java.lang.String UPDATEIdentifier for the update mechanism- See Also:
- Constant Field Values
-
PROPAGATION
private static final java.lang.String PROPAGATIONIdentifier for the propagation mechanism- See Also:
- Constant Field Values
-
SIGHT
private static final java.lang.String SIGHTIdentifier for the sight mechanism- See Also:
- Constant Field Values
-
-
Constructor Details
-
ProtocolParameterReader
public ProtocolParameterReader()
-
-
Method Details
-
readProtocol
public void readProtocol(java.util.Map<java.lang.String,java.lang.Object> protocol)Reads a protocol from an XML.- Parameters:
protocol- the element containing the protocol information.
-
getName
public java.lang.String getName()Obtains the name of the protocol.- Returns:
- the name of the protocol.
-
getParams
Obtains the parameters for the preconfigured protocol.- Returns:
- the parameters if it is preconfigured, null if not.
-
getSelection
Obtains the parameters for the protocol mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getExpiration
Obtains the parameters for the expiration mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getUpdate
Obtains the parameters for the update mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getPropagation
Obtains the parameters for the propagation mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getSight
Obtains the parameters for the sight mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
isPreconfigured
public boolean isPreconfigured()Indicates if the protocol is preconfigured or custom.- Returns:
- true if the protocol is preconfigured, false if it is custom.
-
printProtocol
public java.lang.String printProtocol()Shows the configuration of a protocol.- Returns:
- a string containing the configuration of the protocol.
-