|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dbe.eve.simulator.AbstractService
org.dbe.eve.simulator.Service
public class Service
Represents a service
| Field Summary | |
|---|---|
private java.awt.Color |
color
|
private java.util.Vector |
MigrationPath
|
private int |
position
|
private SME |
ProviderSME
|
| Fields inherited from class org.dbe.eve.simulator.AbstractService |
|---|
attributes, ID, logger |
| Constructor Summary | |
|---|---|
Service(int ID)
Constructs an Service with an ID, random Attributes. |
|
Service(int ID,
int numberOfAttributes)
Constructs an Service with an ID and generates a specific number of random Attributes. |
|
Service(SME providerSME,
int ID)
Constructs a Service with an ID, random Attributes and set the provider SME of this Service. |
|
Service(SME providerSME,
int ID,
java.awt.Color serviceColor)
Constructs a Service with an ID, random Attributes and set the provider SME of this Service. |
|
Service(java.util.Vector attributes,
int id)
Constructs a Service with an Vector of Attributes |
|
Service(java.util.Vector attributes,
SME ProviderSME,
int id)
Constructs an Service with an Vector of Attributes and set the provider SME of this Service. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
create hard copy of an Service |
org.w3c.dom.Element |
getAsXMLElement(org.w3c.dom.Document xmldoc,
java.lang.String tagName)
|
java.awt.Color |
getColor()
return the color of the Service |
boolean |
getCurrentUsefullness()
return true if the Service is usefull for the present owner SME or false if not |
java.util.Vector |
getMigrationPath()
Returns the MigrationPath in which the current and past owner SMEs and the usefullness of the Service for these SMEs are stored |
int |
getNumberOfHops()
return the number of Hops the service did since its generation |
int |
getNumberOfUselessHops()
This methode returns the amount of hops where the Service was useless for the SME |
SME |
getOwnerSME()
return the current owner of the Service |
int |
getPosition()
|
SME |
getProviderSME()
return the Provider or Producer SME |
java.util.Vector |
getSMEsWhereServiceWasUseful()
return all SMEs at which the service was useful |
void |
setColor(java.awt.Color newcolor)
set the color |
void |
setOwnerSME(SME newOwner,
boolean usefull)
adds the current OWNER SME to the MigrationPath |
void |
setPosition(int position)
|
void |
setProviderSME(SME ProviderSME)
set the Provider SME |
| Methods inherited from class org.dbe.eve.simulator.AbstractService |
|---|
addAttribute, compareTo, getAttributes, getServiceID, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int position
private SME ProviderSME
private java.util.Vector MigrationPath
private java.awt.Color color
| Constructor Detail |
|---|
public Service(int ID)
ID -
public Service(SME providerSME,
int ID)
providerSME - is the SME which generated the ServiceID - is the ID of this Service
public Service(SME providerSME,
int ID,
java.awt.Color serviceColor)
providerSME - is the SME which generated the ServiceID - is the ID of this Service
public Service(java.util.Vector attributes,
SME ProviderSME,
int id)
attributes - is a Vector of AttributeProviderSME - is the SME which generated the Service
public Service(java.util.Vector attributes,
int id)
attributes - is a Vector of Attributeid - the id for the service
public Service(int ID,
int numberOfAttributes)
ID - is the ID of this ServicenumberOfAttributes - is the number of Attributes of this Service| Method Detail |
|---|
public SME getProviderSME()
public void setProviderSME(SME ProviderSME)
public void setColor(java.awt.Color newcolor)
public void setOwnerSME(SME newOwner,
boolean usefull)
newOwner - represents the current OWNER SMEusefull - shows if the Service is usefull for the SME or not.public java.util.Vector getSMEsWhereServiceWasUseful()
public SME getOwnerSME()
public java.awt.Color getColor()
public boolean getCurrentUsefullness()
public java.util.Vector getMigrationPath()
public int getNumberOfUselessHops()
public int getNumberOfHops()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic int getPosition()
public void setPosition(int position)
public org.w3c.dom.Element getAsXMLElement(org.w3c.dom.Document xmldoc,
java.lang.String tagName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||