|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.ants.felixgm.trmsim_wsn.trm.TRModel_WSN
public abstract class TRModel_WSN
This class represents a generic Trust and Reputation Model for Wireless Sensor Networks, also applicable to P2P and Ad-hoc ones
A subclass of this class has to be implemented in order to add a new Trust and Reputation Model
| Field Summary | |
|---|---|
protected TRMParameters |
trmParameters
Trust and Reputation Model parameters |
| Constructor Summary | |
|---|---|
protected |
TRModel_WSN(TRMParameters trmParameters)
Creates a new instance of TRModel_WSN |
| Method Summary | |
|---|---|
abstract GatheredInformation |
gatherInformation(Sensor client,
Service service)
This method collects or gathers the required information from the network needed to evaluate each sensor offering a given service in order to determine whether to have a transaction with it or not |
abstract Network |
generateRandomNetwork(int numSensors,
double probClients,
double rangeFactor,
java.util.Collection<java.lang.Double> probServices,
java.util.Collection<java.lang.Double> probGoodness,
java.util.Collection<Service> services)
This method generates a new random network specific for this trust and reputation model |
TRMParameters |
get_TRMParameters()
Returns the associated trust and reputation model´s parameters |
abstract Network |
loadCurrentNetwork(java.lang.String xmlFilePath)
This method loads a network from a XML file and creates the specific network corresponding to this trust and reputation model |
abstract Outcome |
performTransaction(java.util.Vector<Sensor> path,
Service service)
This method actually requests a desired service to a specified server and evaluates the satisfaction of the client with the actually received service |
abstract Outcome |
punish(java.util.Vector<Sensor> path,
Outcome outcome)
This method punishes a server if the client is not satisfied with the received service, according to that precise unsatisfaction |
abstract Outcome |
reward(java.util.Vector<Sensor> path,
Outcome outcome)
This method rewards a server if the client is satisfied with the received service, according to that precise satisfaction |
abstract java.util.Vector<Sensor> |
scoreAndRanking(Sensor client,
GatheredInformation gi)
This method computes a trust and/or reputation value for each reachable server from the specified client and returns either a sorted list of all the reachable servers or a path leading directly to the most trustworthy and/or reputable one |
void |
set_TRMParameters(TRMParameters trmParameters)
Sets the associated trust and reputation model´s parameters |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected TRMParameters trmParameters
| Constructor Detail |
|---|
protected TRModel_WSN(TRMParameters trmParameters)
trmParameters - Trust and Reputation Model parameters| Method Detail |
|---|
public abstract GatheredInformation gatherInformation(Sensor client,
Service service)
client - The client applying this trust and reputation model in order to
find the most trustworthy and reputable server offering a given serviceservice - The service requested by the given client
public abstract java.util.Vector<Sensor> scoreAndRanking(Sensor client,
GatheredInformation gi)
client - The client applying this trust and reputation model in order to
find the most trustworthy and reputable server offering a given servicegi - The gathered information fro the network needed in order to compute
the trust and/or reputation value for each reachable server
public abstract Outcome performTransaction(java.util.Vector<Sensor> path,
Service service)
path - Path of sensors leading to the most trustworthy and reputable server
or sorted list of all the reachable serversservice - Service requested by the client running this trust and reputation model
public abstract Outcome reward(java.util.Vector<Sensor> path,
Outcome outcome)
path - Path of sensors leading to the requesting serveroutcome - Client's satisfaction with the received service
public abstract Outcome punish(java.util.Vector<Sensor> path,
Outcome outcome)
path - Path of sensors leading to the requesting serveroutcome - Client's unsatisfaction with the received service
public abstract Network generateRandomNetwork(int numSensors,
double probClients,
double rangeFactor,
java.util.Collection<java.lang.Double> probServices,
java.util.Collection<java.lang.Double> probGoodness,
java.util.Collection<Service> services)
numSensors - Number of sensors composing the networkprobClients - Probability of a sensor to act as a client requesting servicesrangeFactor - Maximum wireless range of every sensor. It determines the neighborhood of every sensorprobServices - A collection of probabilities of offering a certain service, one per serviceprobGoodness - A collection of goodnesses about offering a certain service, one per serviceservices - All the services offered by the generated Network
public abstract Network loadCurrentNetwork(java.lang.String xmlFilePath)
throws java.lang.Exception
xmlFilePath - Path of the XML to load the network from
java.lang.Exception - If the XML file given does not have the appropriate structure, or if
a sensor links to an undefined sensor, or if a sensor links to itselfpublic TRMParameters get_TRMParameters()
public void set_TRMParameters(TRMParameters trmParameters)
trmParameters - The associated trust and reputation model´s parameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||