Magentix2  2.1.1
es.upv.dsic.gti_ia.core.TracingService Class Reference
Inheritance diagram for es.upv.dsic.gti_ia.core.TracingService:
Collaboration diagram for es.upv.dsic.gti_ia.core.TracingService:

List of all members.

Public Member Functions

 TracingService ()
 TracingService (String serviceName, String description)
void setName (String name)
void setDescription (String description)
String getName ()
boolean getMandatory ()
boolean getRequestable ()
Integer getMaskBitIndex ()
String getDescription ()
TracingEntityList getProviders ()
TracingServiceSubscriptionList getSubscriptions ()
synchronized boolean addServiceProvider (TracingEntity provider)
synchronized boolean addSubscription (TracingServiceSubscription subscription)
synchronized boolean removeProvider (AgentID providerAid)

Static Public Member Functions

static TracingService getDITracingServiceByName (String serviceName)

Static Public Attributes

static final int TRACE_ERROR = 0
static final int SUBSCRIBE = 1
static final int UNSUBSCRIBE = 2
static final int UNAVAILABLE_TS = 3
static final int NEW_AGENT = 4
static final int AGENT_DESTROYED = 5
static final int MESSAGE_SENT = 6
static final int MESSAGE_SENT_DETAIL = 7
static final int MESSAGE_RECEIVED = 8
static final int MESSAGE_RECEIVED_DETAIL = 9
static final int PUBLISHED_TRACING_SERVICE = 10
static final int UNPUBLISHED_TRACING_SERVICE = 11
static final int WELCOME_TM = 12
static final int NEW_MASK = 13
static final int MAX_DI_TS = 14
static final TracingService[] DI_TracingServices

Detailed Description

Definition of Tracing Service.

Author:
L Burdalo (lburdalo@dsic.upv.es)
Jose Vicente Ruiz Cepeda (jruiz1@dsic.upv.es)

Definition at line 18 of file TracingService.java.


Constructor & Destructor Documentation

Void constructor which creates an empty tracing service, without any provider nor subscriptor, which will be requestable ( es.upv.dsic.gti_ia.core.TracingService#requestable == true ), and not mandatory ( es.upv.dsic.gti_ia.core.TracingService#mandatory == false )

See also:
es.upv.dsic.gti_ia.trace.TracingEntityList
es.upv.dsic.gti_ia.trace.TracingEntity
es.upv.dsic.gti_ia.trace.TracingServiceSubscriptionList
es.upv.dsic.gti_ia.trace.TracingServiceSubscription

Definition at line 265 of file TracingService.java.

                                {
                this.name = null;
                this.mandatory = false;
                this.requestable = true;
                this.maskBitIndex = null;
                this.description = null;
                this.providers = new TracingEntityList();
                this.subscriptions = new TracingServiceSubscriptionList();
        }
es.upv.dsic.gti_ia.core.TracingService.TracingService ( String  serviceName,
String  description 
)

Constructor which creates an tracing service with the specified service name and description, without any provider nor subscriptor, which will be requestable ( es.upv.dsic.gti_ia.core.TracingService#requestable == true ), and not mandatory ( es.upv.dsic.gti_ia.core.TracingService#mandatory == false )

Parameters:
serviceNameName of the tracing service
descriptionDescription of the tracing service
See also:
es.upv.dsic.gti_ia.trace.TracingEntityList
es.upv.dsic.gti_ia.trace.TracingEntity
es.upv.dsic.gti_ia.trace.TracingServiceSubscriptionList
es.upv.dsic.gti_ia.trace.TracingServiceSubscription

Definition at line 292 of file TracingService.java.

                                                                      {
                this.name = serviceName;
                this.mandatory = false;
                this.requestable = true;

                /*
                 * Tracing services created by external agents are always controlled by
                 * the CUSTOM bit of the mask.
                 */
                this.maskBitIndex = TraceMask.CUSTOM;

                this.description = description;
                this.providers = new TracingEntityList();
                this.subscriptions = new TracingServiceSubscriptionList();
        }

Member Function Documentation

Adds a provider to the tracing service.

Parameters:
providerTracing entity which will provide the tracing service
Returns:
true if the provider is correctly added or false otherwise
See also:
es.upv.dsic.gti_ia.trace.TracingEntityList::add(TracingEntity)

Definition at line 474 of file TracingService.java.

                                                                               {
                return this.providers.add(provider);
        }

Adds a subscription to the tracing service.

Parameters:
subscriptionSubscription to the tracing service
Returns:
true if the subscription is correctly added or false otherwise
See also:
es.upv.dsic.gti_ia.trace.TracingServiceSubscriptionList::add(TracingServiceSubscription)
es.upv.dsic.gti_ia.trace.TracingServiceSubscription

Definition at line 489 of file TracingService.java.

                                                                 {
                return this.subscriptions.add(subscription);
        }

Returns the description of the tracing service.

Returns:
Description of the tracing service

Definition at line 413 of file TracingService.java.

                                       {
                return this.description;
        }

Returns the domain independent tracing service associated with the given name, or null, if none with that name exists.

Parameters:
serviceNamethe name of the service whose TracingService object wants to be obtained
Returns:
the associated TracingService object or null, if it does not exist

Definition at line 454 of file TracingService.java.

                                                                                   {
                TracingService result = null;
                for (TracingService ts : DI_TracingServices) {
                        if (ts.getName().equals(serviceName))
                                result = ts;
                }
                return result;
        }

Returns true if the tracing service is mandatory (i.e: it cannot be unpublished by any tracing entity).

Returns:
Value of the es.upv.dsic.gti_ia.core.TracingService#mandatory attribute of the TracingService object

Definition at line 380 of file TracingService.java.

                                      {
                return this.mandatory;
        }

Returns the integer that determines the position of the bit in the mask that controls this tracing service, or null if it is no controlled by any position of the mask.

Returns:
Value of the es.upv.dsic.gti_ia.core.TracingService#maskBitIndex attribute of this tracing service.

Definition at line 404 of file TracingService.java.

                                         {
                return this.maskBitIndex;
        }

Returns the name of the tracing service.

Returns:
Name of the tracing service

Definition at line 368 of file TracingService.java.

                                {
                return this.name;
        }

Returns the list of tracing entities which provide the tracing service.

Returns:
Value of the es.upv.dsic.gti_ia.core.TracingService#providers attribute of the TracingService object
See also:
es.upv.dsic.gti_ia.trace.TracingEntityList

Definition at line 426 of file TracingService.java.

                                                {
                return this.providers;
        }

Returns true if the tracing service is requestable.

Returns:
Value of the es.upv.dsic.gti_ia.core.TracingService#requestable attribute of the TracingService object

Definition at line 391 of file TracingService.java.

                                        {
                return this.requestable;
        }
synchronized boolean es.upv.dsic.gti_ia.core.TracingService.removeProvider ( AgentID  providerAid)

Removes provider from a tracing service.

Parameters:
providerAidAgentID of the agent to be removed from the es.upv.dsic.gti_ia.core.TracingService#providers list of the tracing service
Returns:
true if the provider is correctly removed or false otherwise
See also:
es.upv.dsic.gti_ia.trace.TracingEntityList::remove(Object)

Definition at line 506 of file TracingService.java.

                                                                        {
                return this.providers.remove(new TracingEntity(TracingEntity.AGENT,
                                providerAid));
        }

Sets the description of the tracing service.

Parameters:
descriptionNew description of the tracing service

Definition at line 359 of file TracingService.java.

                                                       {
                this.description = description;
        }

Sets the name of the tracing service.

Parameters:
nameNew name of the tracing service

Definition at line 349 of file TracingService.java.

                                         {
                this.name = name;
        }

Member Data Documentation

An agent was destroyed

Definition at line 65 of file TracingService.java.

Array of Domain Independent Tracing Services

Definition at line 140 of file TracingService.java.

Number of supported Domain Independent Tracing Services

Definition at line 135 of file TracingService.java.

A FIPA-ACL message was received

Definition at line 85 of file TracingService.java.

A FIPA-ACL message was received. Message included in the event

Definition at line 90 of file TracingService.java.

A FIPA-ACL message was sent

Definition at line 75 of file TracingService.java.

A FIPA-ACL message was sent. Message included in the event

Definition at line 80 of file TracingService.java.

A new agent was registered in the system

Definition at line 56 of file TracingService.java.

The mask of tracing services has been changed.

Definition at line 130 of file TracingService.java.

A new tracing service has been published by an ES entity

Definition at line 109 of file TracingService.java.

The ER entity subscribed to a tracing service

Definition at line 35 of file TracingService.java.

General error in the tracing process

Definition at line 28 of file TracingService.java.

The tracing service which was requested does not exist or it has been un published and thus, it is not available anymore

Definition at line 46 of file TracingService.java.

A tracing service is not being offered by an ER entity

Definition at line 114 of file TracingService.java.

The ER entity unsubscribed from a tracing service

Definition at line 40 of file TracingService.java.

A new trace manager was registered in the system.

Definition at line 125 of file TracingService.java.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables