es.upv.dsic.gti_ia.core
Class TracingService

java.lang.Object
  extended by es.upv.dsic.gti_ia.core.TracingService
All Implemented Interfaces:
Serializable

public class TracingService
extends Object
implements Serializable

Definition of Tracing Service.

Author:
L Burdalo (lburdalo@dsic.upv.es)
See Also:
Serialized Form

Field Summary
static int AGENT_DESTROYED
          An agent was destroyed
static TracingService[] DI_TracingServices
          Array of Domain Independent Tracing Services
static int MAX_DI_TS
          Number of supported Domain Independent Tracing Services
static int MESSAGE_RECEIVED
          A FIPA-ACL message was received
static int MESSAGE_RECEIVED_DETAIL
          A FIPA-ACL message was received.
static int MESSAGE_SENT
          A FIPA-ACL message was sent
static int MESSAGE_SENT_DETAIL
          A FIPA-ACL message was sent.
static int NEW_AGENT
          A new agent was registered in the system
static int PUBLISHED_TRACING_SERVICE
          A new tracing service has been published by an ES entity
static int SUBSCRIBE
          The ER entity subscribed to a tracing service
static int TRACE_ERROR
          General error in the tracing process
static int UNAVAILABLE_TS
          The tracing service which was requested does not exist or it has been un published and thus, it is not available anymore
static int UNPUBLISHED_TRACING_SERVICE
          A tracing service is not being offered by an ER entity
static int UNSUBSCRIBE
          The ER entity unsubscribed from a tracing service
 
Constructor Summary
TracingService()
          Void constructor which creates an empty tracing service, without any provider nor subscriptor, which will be requestable ( requestable == true ), and not mandatory ( mandatory == false )
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 ( requestable == true ), and not mandatory ( mandatory == false )
 
Method Summary
 boolean addServiceProvider(TracingEntity provider)
          Adds a provider to the tracing service.
 boolean addSubscription(TracingServiceSubscription subscription)
          Adds a subscription to the tracing service.
 String getDescription()
          Returns the description of the tracing service.
 boolean getMandatory()
          Returns true if the tracing service is mandatory (i.e: it cannot be unpublished by any tracing entity).
 String getName()
          Returns the name of the tracing service.
 TracingEntityList getProviders()
          Returns the list of tracing entities which provide the tracing service.
 boolean getRequestable()
          Returns true if the tracing service is requestable.
 TracingServiceSubscriptionList getSubscriptions()
          Returns the list of subscriptions to that tracing service.
 boolean removeProvider(AgentID providerAid)
          Removes provider from a tracing service.
 void setDescription(String description)
          Sets the description of the tracing service.
 void setName(String name)
          Sets the name of the tracing service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE_ERROR

public static final int TRACE_ERROR
General error in the tracing process

See Also:
Constant Field Values

SUBSCRIBE

public static final int SUBSCRIBE
The ER entity subscribed to a tracing service

See Also:
Constant Field Values

UNSUBSCRIBE

public static final int UNSUBSCRIBE
The ER entity unsubscribed from a tracing service

See Also:
Constant Field Values

UNAVAILABLE_TS

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

See Also:
Constant Field Values

NEW_AGENT

public static final int NEW_AGENT
A new agent was registered in the system

See Also:
Constant Field Values

AGENT_DESTROYED

public static final int AGENT_DESTROYED
An agent was destroyed

See Also:
Constant Field Values

MESSAGE_SENT

public static final int MESSAGE_SENT
A FIPA-ACL message was sent

See Also:
Constant Field Values

MESSAGE_SENT_DETAIL

public static final int MESSAGE_SENT_DETAIL
A FIPA-ACL message was sent. Message included in the event

See Also:
Constant Field Values

MESSAGE_RECEIVED

public static final int MESSAGE_RECEIVED
A FIPA-ACL message was received

See Also:
Constant Field Values

MESSAGE_RECEIVED_DETAIL

public static final int MESSAGE_RECEIVED_DETAIL
A FIPA-ACL message was received. Message included in the event

See Also:
Constant Field Values

PUBLISHED_TRACING_SERVICE

public static final int PUBLISHED_TRACING_SERVICE
A new tracing service has been published by an ES entity

See Also:
Constant Field Values

UNPUBLISHED_TRACING_SERVICE

public static final int UNPUBLISHED_TRACING_SERVICE
A tracing service is not being offered by an ER entity

See Also:
Constant Field Values

MAX_DI_TS

public static final int MAX_DI_TS
Number of supported Domain Independent Tracing Services

See Also:
Constant Field Values

DI_TracingServices

public static final TracingService[] DI_TracingServices
Array of Domain Independent Tracing Services

Constructor Detail

TracingService

public TracingService()
Void constructor which creates an empty tracing service, without any provider nor subscriptor, which will be requestable ( requestable == true ), and not mandatory ( mandatory == false )

See Also:
TracingEntityList, TracingEntity, TracingServiceSubscriptionList, TracingServiceSubscription

TracingService

public 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 ( requestable == true ), and not mandatory ( mandatory == false )

Parameters:
serviceName - Name of the tracing service
description - Description of the tracing service
See Also:
TracingEntityList, TracingEntity, TracingServiceSubscriptionList, TracingServiceSubscription
Method Detail

setName

public void setName(String name)
Sets the name of the tracing service.

Parameters:
name - New name of the tracing service

setDescription

public void setDescription(String description)
Sets the description of the tracing service.

Parameters:
description - New description of the tracing service

getName

public String getName()
Returns the name of the tracing service.

Returns:
Name of the tracing service

getMandatory

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

Returns:
Value of the mandatory attribute of the TracingService object

getRequestable

public boolean getRequestable()
Returns true if the tracing service is requestable.

Returns:
Value of the requestable attribute of the TracingService object

getDescription

public String getDescription()
Returns the description of the tracing service.

Returns:
Description of the tracing service

getProviders

public TracingEntityList getProviders()
Returns the list of tracing entities which provide the tracing service.

Returns:
Value of the providers attribute of the TracingService object
See Also:
TracingEntityList

getSubscriptions

public TracingServiceSubscriptionList getSubscriptions()
Returns the list of subscriptions to that tracing service.

Returns:
Value of the subscriptions attribute of the TracingService object
See Also:
TracingServiceSubscriptionList, TracingServiceSubscription

addServiceProvider

public boolean addServiceProvider(TracingEntity provider)
Adds a provider to the tracing service.

Parameters:
provider - Tracing 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)

addSubscription

public boolean addSubscription(TracingServiceSubscription subscription)
Adds a subscription to the tracing service.

Parameters:
subscription - Subscription 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), TracingServiceSubscription

removeProvider

public boolean removeProvider(AgentID providerAid)
Removes provider from a tracing service.

Parameters:
providerAid - AgentID of the agent to be removed from the providers list of the tracing service
Returns:
true if the provider is correctly removed or false otherwise
See Also:
ArrayList.remove(Object)


Copyright © 2012 GTI-IA. All Rights Reserved.