|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.trace.TracingEntity
public class TracingEntity
Definition of Tracing Entity TODO: Artifacts and aggregations are not yet supported far beyond the constants defined in the class
| Field Summary | |
|---|---|
static int |
AGENT
Constant to identify the tracing entity as an agent |
static int |
AGGREGATION
Constant to identify the tracing entity as an agent |
static int |
ARTIFACT
Constant to identify the tracing entity as an agent |
| Constructor Summary | |
|---|---|
TracingEntity()
Constructor which creates an empty tracing entity, with its type attribute set to -1, its aid set to null and without published tracing services nor subscriptions |
|
TracingEntity(int type,
AgentID aid)
Constructor which creates a new tracing entity without published tracing services nor subscriptions. |
|
| Method Summary | |
|---|---|
boolean |
addSubscription(TracingServiceSubscription newSubscription)
Add a new subscription to the tracing entity |
AgentID |
getAid()
Get the AgentID of the tracing entity |
TracingServiceList |
getPublishedTS()
Get the list of tracing services published by the tracing entity |
TracingServiceSubscriptionList |
getSubscribedToTS()
Get the list of subscriptions made by the tracing entity |
int |
getType()
Get the type of the tracing entity |
boolean |
hasTheSameAidAs(AgentID aid)
Determine if a tracing entity has the same AgentID as the specified |
boolean |
removeSubscription(TracingServiceSubscription TSSubscription)
Remove a tracing service subscription from the list |
int |
setType(int type)
Set the type of the tracing entity |
String |
toReadableString()
Converts the identifying data of the tracing entity to a human readable string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int AGENT
public static final int ARTIFACT
public static final int AGGREGATION
| Constructor Detail |
|---|
public TracingEntity()
public TracingEntity(int type,
AgentID aid)
Only agents are supported; so, if the tracing entity is an artifact or an aggregation, aid is set to null
| Method Detail |
|---|
public int getType()
AGENT,
ARTIFACT or
AGGREGATIONpublic AgentID getAid()
public TracingServiceList getPublishedTS()
TracingService,
TracingServiceListpublic TracingServiceSubscriptionList getSubscribedToTS()
TracingServiceSubscription,
TracingServiceSubscriptionListpublic int setType(int type)
type - Allowed types are AGENT,
ARTIFACT and
AGGREGATION}
public boolean addSubscription(TracingServiceSubscription newSubscription)
newSubscription - TracingServiceSubscription to be added to the listpublic boolean removeSubscription(TracingServiceSubscription TSSubscription)
TSSubscription - Subscription to be removed
0 : Success. The tracing service subscription has been removed from the end of the list
-1 : Internal values of the list are not correct. There is something really wrong if this happens :-S
-2 : Subscription not found
TracingServiceSubscriptionListpublic boolean hasTheSameAidAs(AgentID aid)
aid - AgentID to compare with the tracing entity
public String toReadableString()
AgentID.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||