|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanet.behaviour.BehaviourProperties
This class allows to add new behaviours to bad nodes on the overlay. Each behaviour is binded to the type of message exchanged between nodes. The message are defined by a type and mode field. It also allow the use of the wildcard '*', that means, whatever type if is specified in type's field or either whatever mode if is specified in mode's field. Through the method init(), so that their values are initialized.
Field Summary | |
static int |
CHAIN
Chain Distribution. |
static java.lang.String |
DEBUG_INFO
Behaviour.Property: Specifies We Want Debug Or Not Debug Info. |
boolean |
debugInfo
|
static java.lang.String |
DEFAULT_FAULTY_NODES
Behaviour.Property: Default percentatge of malicious nodes |
static java.lang.String |
DEFAULT_MALICIOUS_DISTRIBUTION
Behaviour.Property: Default malicious node distribution |
static java.lang.String[] |
DISTR
|
static java.lang.String |
FILTER
Behaviour.Property: Specifies The Filter For Behaviours Queue. |
java.lang.Class |
filterClass
|
int |
maliciousDistribution
|
java.util.Vector |
patterns
|
float |
percentageOfMalicious
|
static java.lang.String |
ROLE_SELECTOR
Behaviour.Property: Specifies Node's role according to some distribuiton. |
java.lang.Class |
selectorClass
|
static int |
UNIFORM
Uniform Distribution. |
Constructor Summary | |
BehaviourProperties()
|
Method Summary | |
protected void |
add(Pattern pattern)
This method add patterns to the vector sorted from more-to-less specific. |
java.lang.Class |
getFilter()
|
java.util.Vector |
getPatterns()
|
void |
init(java.lang.String propertiesFile)
Initialize correctly the behaviours. |
protected boolean |
isNormalized(double d)
This method checks wether a double value lies between (0.0, 1.0] range. |
protected void |
printPatterns()
Prints sorted patterns from more-to-less specific. |
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 FILTER
public static final java.lang.String DEBUG_INFO
public static final java.lang.String DEFAULT_FAULTY_NODES
public static final java.lang.String DEFAULT_MALICIOUS_DISTRIBUTION
public static final java.lang.String ROLE_SELECTOR
public static final int UNIFORM
public static final int CHAIN
public static final java.lang.String[] DISTR
public float percentageOfMalicious
public int maliciousDistribution
public boolean debugInfo
public java.lang.Class selectorClass
public java.lang.Class filterClass
public java.util.Vector patterns
Constructor Detail |
public BehaviourProperties()
Method Detail |
public void init(java.lang.String propertiesFile) throws InitializationException
init
in interface PropertiesInitializer
propertiesFile
- File with all configuration properties of the concrete
Behaviours. This file must follow java.util.Properties scheme.
InitializationException
- if an error occurs during the initialization
of the different properties.public java.util.Vector getPatterns()
public java.lang.Class getFilter()
protected void add(Pattern pattern)
pattern
- Pattern to insert.protected boolean isNormalized(double d)
d
- double value to check
protected void printPatterns()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |