|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectplanet.behaviour.Pattern
public class Pattern
This class stores a pattern for incoming messages on a node. This pattern is used to dispatch a behaviour classOf whenever the pattern matches the type and mode of the incoming message. To allow behaviours to execute randomly on time, every pattern has a probability.
Field Summary | |
---|---|
static java.lang.String |
Always
Overlay property: Always refers to a behvaiour which must run always despite RouteMessage's destination. |
static java.lang.String |
Bad
Overlay property: Bad refers to a behvaiour which must run when node misbehaves, including routing and overlay invariant's maintenance. |
static java.lang.String |
Cwildcard
Complementary wildcard: given a set of patterns P, this wildcard is used to attach a behaviour to the patterns on the whole pattern space S not included in P set. |
static java.lang.String |
Good
Overlay property: Good refers to a behaviour which must run when node behaves as underlying kbr protocol stipulates. |
static java.lang.String |
Local
Overlay property: Local refers to a behaviour which must run only when RouteMessage's pattern is for him. |
static java.lang.String |
Neutral
Overlay property: Neutral refers to a behvaiour which must run always despite node's role is bad or good. |
static java.lang.String |
Remote
Overlay property: Remote refers to a behaviour which must run only when RouteMessage's pattern is for another peer rather than him. |
static java.lang.String |
Uwildcard
Universal wildcard: given a set of patterns P, this wildcard is used to attach a behaviour to all the patterns on the whole pattern space S included P set, i.e. |
Constructor Summary | |
---|---|
Pattern(java.lang.Class classOf,
java.lang.String typeOf,
java.lang.String modeOf,
double pdf,
java.lang.String whenTo,
java.lang.String roleOf)
|
Method Summary | |
---|---|
int |
compareTo(Pattern pattern)
Compares two patterns based on specific criteria. |
java.lang.Class |
getClassOf()
|
int |
getMap()
|
java.lang.String |
getModeOf()
|
double |
getPdf()
|
java.lang.String |
getRoleOf()
|
java.lang.String |
getTypeOf()
|
java.lang.String |
getWhenTo()
|
int |
map(java.lang.String property)
Maps a property to specific quantifier. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String Cwildcard
public static final java.lang.String Uwildcard
public static final java.lang.String Local
public static final java.lang.String Remote
public static final java.lang.String Always
public static final java.lang.String Good
public static final java.lang.String Bad
public static final java.lang.String Neutral
Constructor Detail |
---|
public Pattern(java.lang.Class classOf, java.lang.String typeOf, java.lang.String modeOf, double pdf, java.lang.String whenTo, java.lang.String roleOf)
Method Detail |
---|
public java.lang.Class getClassOf()
public java.lang.String getModeOf()
public double getPdf()
public java.lang.String getTypeOf()
public java.lang.String getWhenTo()
public java.lang.String getRoleOf()
public int getMap()
public int map(java.lang.String property)
property
- The property to quantify.
public int compareTo(Pattern pattern)
pattern
- The pattern to compare.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |