Magentix2  2.1.1
es.upv.dsic.gti_ia.trace.TraceInteract Class Reference
Collaboration diagram for es.upv.dsic.gti_ia.trace.TraceInteract:

List of all members.

Static Public Member Functions

static void publishTracingService (BaseAgent applicantAgent, String serviceName, String description) throws TraceServiceNotAllowedException
static void publishTracingService (AgentID tms_aid, BaseAgent applicantAgent, String serviceName, String description) throws TraceServiceNotAllowedException
static void unpublishTracingService (BaseAgent applicantAgent, String serviceName) throws TraceServiceNotAllowedException
static void unpublishTracingService (AgentID tms_aid, BaseAgent applicantAgent, String serviceName) throws TraceServiceNotAllowedException
static void requestTracingService (BaseAgent requesterAgent, String serviceName) throws TraceServiceNotAllowedException
static void requestTracingService (BaseAgent requesterAgent, String serviceName, AgentID originEntity) throws TraceServiceNotAllowedException
static void requestTracingService (AgentID tms_aid, BaseAgent requesterAgent, String serviceName) throws TraceServiceNotAllowedException
static void requestTracingService (AgentID tms_aid, BaseAgent requesterAgent, String serviceName, AgentID originEntity) throws TraceServiceNotAllowedException
static void requestAllTracingServices (BaseAgent requesterAgent) throws TraceServiceNotAllowedException
static void requestAllTracingServices (AgentID tms_aid, BaseAgent requesterAgent) throws TraceServiceNotAllowedException
static void cancelTracingServiceSubscription (BaseAgent requesterAgent, String serviceName) throws TraceServiceNotAllowedException
static void cancelTracingServiceSubscription (BaseAgent requesterAgent, String serviceName, AgentID originEntity) throws TraceServiceNotAllowedException
static void cancelTracingServiceSubscription (AgentID tms_aid, BaseAgent requesterAgent, String serviceName) throws TraceServiceNotAllowedException
static void cancelTracingServiceSubscription (AgentID tms_aid, BaseAgent requesterAgent, String serviceName, AgentID originEntity) throws TraceServiceNotAllowedException
static void listTracingEntities (BaseAgent applicantAgent) throws TraceServiceNotAllowedException
static void listTracingEntities (AgentID tms_aid, BaseAgent applicantAgent) throws TraceServiceNotAllowedException
static void listTracingServices (BaseAgent applicantAgent) throws TraceServiceNotAllowedException
static void listTracingServices (AgentID tms_aid, BaseAgent applicantAgent) throws TraceServiceNotAllowedException

Static Public Attributes

static final AgentID DEFAULT_TM_AID = new AgentID(DEFAULT_TM_NAME)

Detailed Description

Methods to interact with the trace manager in order to publish and unpublish tracing services, to subscribe and unsubscribe to/from tracing services and to list available tracing entities and services.

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

Definition at line 17 of file TraceInteract.java.


Member Function Documentation

static void es.upv.dsic.gti_ia.trace.TraceInteract.cancelTracingServiceSubscription ( BaseAgent  requesterAgent,
String  serviceName 
) throws TraceServiceNotAllowedException [static]

Cancel subscription to a tracing service from any tracing entity.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(AgentID tms_aid, BaseAgent requesterAgent, String serviceName)

This method cancels the subscription to a tracing service from a specific tracing entity. To cancel a subscription to any entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(BaseAgent requesterAgent, String serviceName, AgentID originEntity)

Parameters:
requesterAgentAgent which wants to cancel its subscription
serviceNameName of the tracing service to which the subscription was made
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service is not available

Definition at line 474 of file TraceInteract.java.

                                                               {
                cancelTracingServiceSubscription(DEFAULT_TM_AID, requesterAgent,
                                serviceName, null);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.cancelTracingServiceSubscription ( BaseAgent  requesterAgent,
String  serviceName,
AgentID  originEntity 
) throws TraceServiceNotAllowedException [static]

Cancel subscription to a tracing service from a specific tracing entity.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(AgentID tms_aid, BaseAgent requesterAgent, String serviceName, AgentID originEntity)

This method cancels the subscription to a tracing service from a specific tracing entity. To cancel a subscription to any entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(BaseAgent requesterAgent, String serviceName)

Parameters:
requesterAgentAgent which wants to cancel its subscription
serviceNameName of the tracing service to which the subscription was made
originEntityAgentID of the tracing entity to which the subscription referred to
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service is not available

Definition at line 505 of file TraceInteract.java.

                                                               {
                cancelTracingServiceSubscription(DEFAULT_TM_AID, requesterAgent,
                                serviceName, originEntity);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.cancelTracingServiceSubscription ( AgentID  tms_aid,
BaseAgent  requesterAgent,
String  serviceName 
) throws TraceServiceNotAllowedException [static]

Cancel subscription to a tracing service from any tracing entity.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(BaseAgent requesterAgent, String serviceName)

This method cancels the subscription to a tracing service from a specific tracing entity. To cancel a subscription to any entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(AgentID tms_aid, BaseAgent requesterAgent, String serviceName, AgentID originEntity)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
requesterAgentAgent which wants to cancel its subscription
serviceNameName of the tracing service to which the subscription was made
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service is not available

Definition at line 536 of file TraceInteract.java.

                                                               {
                cancelTracingServiceSubscription(tms_aid, requesterAgent, serviceName,
                                null);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.cancelTracingServiceSubscription ( AgentID  tms_aid,
BaseAgent  requesterAgent,
String  serviceName,
AgentID  originEntity 
) throws TraceServiceNotAllowedException [static]

Cancel subscription to a tracing service from a specific tracing entity.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(BaseAgent requesterAgent, String serviceName, AgentID originEntity)

This method cancels the subscription to a tracing service from a specific tracing entity. To cancel a subscription to any entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#cancelTracingServiceSubscription(AgentID tms_aid, BaseAgent requesterAgent, String serviceName)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
requesterAgentAgent which wants to cancel its subscription
serviceNameName of the tracing service to which the subscription was made
originEntityAgentID of the tracing entity to which the subscription referred to
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service is not available

Definition at line 570 of file TraceInteract.java.

                                                               {
                String body = null;
                TraceMask traceMask = requesterAgent.getTraceMask();

                // Check if the service requested is domain independent.
                TracingService ts = TracingService
                                .getDITracingServiceByName(serviceName);

                if (ts == null) {
                        /*
                         * If it is not domain independent, it must be CUSTOM. Check that
                         * bit in the mask.
                         */
                        if (traceMask.get(TraceMask.CUSTOM) == false) {
                                throw new TraceServiceNotAllowedException();
                        }
                } else {
                        /*
                         * If it is domain independent, check the corresponding bit in the
                         * mask.
                         */
                        if (traceMask.get(ts.getMaskBitIndex()) == false) {
                                throw new TraceServiceNotAllowedException();
                        }
                }

                /*
                 * The mask has been checked and the required bit is set. Proceed to
                 * send the message.
                 */
                if (originEntity == null) {
                        /*
                         * If the origin entity has not been specified, i.e., any entity is
                         * valid, so use "any" label.
                         */
                        body = serviceName + SEPARATION_CHAR + ANY_LABEL;
                } else {
                        /*
                         * The origin entity has been specified. Use it.
                         */
                        body = serviceName + SEPARATION_CHAR + originEntity.toString();
                }

                sendACLMessage(requesterAgent, ACLMessage.CANCEL, tms_aid, body);
        }

Request a list of registered tracing entities.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#listTracingEntities(AgentID tms_aid, BaseAgent applicantAgent)

Parameters:
applicantAgentAgent which wants to receive the list of tracing entities
Exceptions:
TraceServiceNotAllowedExceptionif it is not possible to list all the entities

Definition at line 632 of file TraceInteract.java.

                                                                                                                {
                listTracingEntities(DEFAULT_TM_AID, applicantAgent);
        }

Request a list of registered tracing entities to a specific trace manager entity.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#listTracingEntities(BaseAgent applicantAgent)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
applicantAgentAgent which wants to receive the list of tracing entities
Exceptions:
TraceServiceNotAllowedExceptionif it is not possible to list all the entities

Definition at line 654 of file TraceInteract.java.

                                                                                         {
                TraceMask traceMask = applicantAgent.getTraceMask();
                // If it is not possible to list all entities.
                if (traceMask.get(TraceMask.LIST_ENTITIES) == false) {
                        throw new TraceServiceNotAllowedException();
                } else {
                        String body = LIST_LABEL + SEPARATION_CHAR + ENTITIES_LABEL;
                        sendACLMessage(applicantAgent, ACLMessage.REQUEST, tms_aid, body);
                }
        }

Request a list of registered tracing services.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#listTracingServices(AgentID tms_aid, BaseAgent applicantAgent)

Parameters:
applicantAgentAgent which wants to receive the list of tracing services
Exceptions:
TraceServiceNotAllowedExceptionif it is not possible to list all the services

Definition at line 680 of file TraceInteract.java.

                                                                                                                {
                listTracingServices(DEFAULT_TM_AID, applicantAgent);
        }

Request a list of registered tracing entities.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#listTracingServices(BaseAgent applicantAgent)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
applicantAgentAgent which wants to receive the list of tracing services
Exceptions:
TraceServiceNotAllowedExceptionif it is not possible to list all the services

Definition at line 701 of file TraceInteract.java.

                                                                                         {
                TraceMask traceMask = applicantAgent.getTraceMask();
                // If it is not possible to list all entities.
                if (traceMask.get(TraceMask.LIST_SERVICES) == false) {
                        throw new TraceServiceNotAllowedException();
                } else {
                        String body = LIST_LABEL + SEPARATION_CHAR + SERVICES_LABEL;
                        sendACLMessage(applicantAgent, ACLMessage.REQUEST, tms_aid, body);
                }
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.publishTracingService ( BaseAgent  applicantAgent,
String  serviceName,
String  description 
) throws TraceServiceNotAllowedException [static]

Publish a tracing service so that other agents can request it and receive the corresponding trace events.

The applicant agent must specify a name for the tracing service, the corresponding type of the trace events which will be provided by the service and a description of the tracing service.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#publishTracingService(AgentID tms_aid, BaseAgent applicantAgent, String serviceName, String description)

Parameters:
applicantAgentAgent which wants to publish the tracing service
serviceNameName of the tracing service which is to be published
descriptionDescription of the tracing service to be published
Exceptions:
TraceServiceNotAllowedExceptionif the custom tracing services are not allowed
See also:
es.upv.dsic.gti_ia.core.TracingService

Definition at line 87 of file TraceInteract.java.

                                                               {
                publishTracingService(DEFAULT_TM_AID, applicantAgent, serviceName,
                                description);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.publishTracingService ( AgentID  tms_aid,
BaseAgent  applicantAgent,
String  serviceName,
String  description 
) throws TraceServiceNotAllowedException [static]

Publish a tracing service so that other agents can request it and receive the corresponding trace events.

The applicant agent must specify a name for the tracing service, the corresponding type of the trace events which will be provided by the service and a description of the tracing service.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#publishTracingService(BaseAgent applicantAgent, String serviceName, String description)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the publication request
applicantAgentAgent which wants to publish the tracing service
serviceNameName of the tracing service which is to be published
descriptionDescription of the tracing service to be published
Exceptions:
TraceServiceNotAllowedExceptionif the custom tracing services are not allowed
See also:
es.upv.dsic.gti_ia.core.TracingService
es.upv.dsic.gti_ia.core.AgentID

Definition at line 124 of file TraceInteract.java.

                                                               {
                TraceMask traceMask = applicantAgent.getTraceMask();
                // If the custom tracing services are not allowed.
                if (traceMask.get(TraceMask.CUSTOM) == false) {
                        throw new TraceServiceNotAllowedException();
                } else {
                        String body = PUBLISH_LABEL + SEPARATION_CHAR
                                        + serviceName.length() + SEPARATION_CHAR + serviceName
                                        + description;
                        sendACLMessage(applicantAgent, ACLMessage.REQUEST, tms_aid, body);
                }
        }

Request all tracing services available at the time.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestAllTracingServices(AgentID tms_aid, BaseAgent requesterAgent)

Parameters:
requesterAgentAgent which wants to request tracing services
Exceptions:
TraceServiceNotAllowedExceptionif it is not possible to subscribe to all tracing services

Definition at line 419 of file TraceInteract.java.

Request all tracing services available at the time.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestAllTracingServices(BaseAgent requesterAgent)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
requesterAgentAgent which wants to request tracing services
Exceptions:
TraceServiceNotAllowedExceptionif it is not possible to subscribe to all tracing services

Definition at line 441 of file TraceInteract.java.

                                                                                         {
                TraceMask traceMask = requesterAgent.getTraceMask();
                // If it is not possible to subscribe to all tracing services.
                if (traceMask.get(TraceMask.SUBSCRIBE_TO_ALL_SERVICES) == false) {
                        throw new TraceServiceNotAllowedException();
                } else {
                        String body = ALL_LABEL;
                        sendACLMessage(requesterAgent, ACLMessage.SUBSCRIBE, tms_aid, body);
                }
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.requestTracingService ( BaseAgent  requesterAgent,
String  serviceName 
) throws TraceServiceNotAllowedException [static]

Request a tracing service from any tracing entity.

The requester agent must specify a name for the tracing service, the corresponding type of the trace events which will be provided by the service and a description of the tracing service.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(AgentID tms_aid, BaseAgent requesterAgent, String serviceName)

This method requests a tracing service from any tracing entity which provides it. To request a tracing service from a specific tracing entity and receive only the trace events of the corresponding tracing service generated by that entity in the system, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(BaseAgent requesterAgent, String serviceName, AgentID originEntity)

Parameters:
requesterAgentAgent which wants to request the tracing service
serviceNameName of the tracing service which is to be requested
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service cannot be requested
See also:
es.upv.dsic.gti_ia.core.TracingService

Definition at line 236 of file TraceInteract.java.

                                                                                   {
                requestTracingService(DEFAULT_TM_AID, requesterAgent, serviceName, null);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.requestTracingService ( BaseAgent  requesterAgent,
String  serviceName,
AgentID  originEntity 
) throws TraceServiceNotAllowedException [static]

Request a tracing service from a specific tracing entity.

The requester agent must specify a name for the tracing service, the corresponding type of the trace events which will be provided by the service and a description of the tracing service.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(AgentID tms_aid, BaseAgent requesterAgent, String serviceName, AgentID originEntity)

This method requests a tracing service provided by a specific tracing entity. To request a tracing service from any tracing entity and receive the trace events of the corresponding tracing service from any entity in the system which offers that tracing service, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(BaseAgent requesterAgent, String serviceName)

Parameters:
requesterAgentAgent which wants to request the tracing service
serviceNameName of the tracing service which is to be requested
originEntityAgentID of the tracing entity whose tracing service is requested
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service cannot be requested
See also:
es.upv.dsic.gti_ia.core.TracingService

Definition at line 275 of file TraceInteract.java.

                                                               {
                requestTracingService(DEFAULT_TM_AID, requesterAgent, serviceName,
                                originEntity);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.requestTracingService ( AgentID  tms_aid,
BaseAgent  requesterAgent,
String  serviceName 
) throws TraceServiceNotAllowedException [static]

Request a tracing service from any tracing entity.

The requester agent must specify a name for the tracing service, the corresponding type of the trace events which will be provided by the service and a description of the tracing service.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(AgentID tms_aid, BaseAgent requesterAgent, String serviceName)

This method requests a tracing service to receive trace events coming from any tracing entity which provides it. To request a tracing service a specific tracing entity and receive only the trace events which that tracing entity generates, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(BaseAgent requesterAgent, String serviceName, AgentID originEntity)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
requesterAgentAgent which wants to request the tracing service
serviceNameName of the tracing service which is to be requested
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service cannot be requested
See also:
es.upv.dsic.gti_ia.core.TracingService

Definition at line 315 of file TraceInteract.java.

                                                               {
                requestTracingService(tms_aid, requesterAgent, serviceName, null);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.requestTracingService ( AgentID  tms_aid,
BaseAgent  requesterAgent,
String  serviceName,
AgentID  originEntity 
) throws TraceServiceNotAllowedException [static]

Request a tracing service from a specific tracing entity.

The requester agent must specify a name for the tracing service, the corresponding type of the trace events which will be provided by the service and a description of the tracing service.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(BaseAgent requesterAgent, String serviceName, AgentID originEntity)

This method requests a tracing service provided by a specific tracing entity. To request a tracing service from any tracing entity and receive the trace events of the corresponding tracing service from any entity in the system which offers that tracing service, use the method es.upv.dsic.gti_ia.trace.TraceInteract#requestTracingService(AgentID tms_aid, BaseAgent requesterAgent, String serviceName, AgentID originEntity)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the request
requesterAgentAgent which wants to request the tracing service
serviceNameName of the tracing service which is to be requested
originEntityAgentID of the tracing entity whose tracing service is requested
Exceptions:
TraceServiceNotAllowedExceptionif the tracing service cannot be requested
See also:
es.upv.dsic.gti_ia.core.TracingService

Definition at line 357 of file TraceInteract.java.

                                                               {
                String body = null;
                TraceMask traceMask = requesterAgent.getTraceMask();

                // Check if the service requested is domain independent.
                TracingService ts = TracingService
                                .getDITracingServiceByName(serviceName);

                if (ts == null) {
                        /*
                         * If it is not domain independent, it must be CUSTOM. Check that
                         * bit in the mask.
                         */
                        if (traceMask.get(TraceMask.CUSTOM) == false) {
                                throw new TraceServiceNotAllowedException();
                        }
                } else {
                        /*
                         * If it is domain independent, check the corresponding bit in the
                         * mask.
                         */
                        if (traceMask.get(ts.getMaskBitIndex()) == false) {
                                throw new TraceServiceNotAllowedException();
                        }
                }

                /*
                 * The mask has been checked and the required bit is set. Proceed to
                 * send the message.
                 */
                if (originEntity == null) {
                        /*
                         * If the origin entity has not been specified, i.e., any entity is
                         * valid, so use "any" label.
                         */
                        body = serviceName + SEPARATION_CHAR + ANY_LABEL;
                } else {
                        /*
                         * The origin entity has been specified. Use it.
                         */
                        body = serviceName + SEPARATION_CHAR + originEntity.toString();
                }

                sendACLMessage(requesterAgent, ACLMessage.SUBSCRIBE, tms_aid, body);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.unpublishTracingService ( BaseAgent  applicantAgent,
String  serviceName 
) throws TraceServiceNotAllowedException [static]

Unpublish a tracing service.

Unpublish a previously published tracing service so that other agents cannot subscribe nor receive the corresponding trace events from the applicantAgent (if there were more providers of the tracing service, subscribers would still be able to receive trace events of that tracing service generated by these other providers.

This method communicates via ACL with a trace manager entity in localhost ("qpid://TM@localhost:8080"). To interact with a different trace manager entity, use the method es.upv.dsic.gti_ia.trace.TraceInteract#unpublishTracingService(AgentID tms_aid, BaseAgent applicantAgent, String serviceName)

Parameters:
applicantAgentAgent which wants to unpublish the tracing service
serviceNameName of the tracing service which is to be unpublished
Exceptions:
TraceServiceNotAllowedExceptionif the custom tracing services are not allowed

Definition at line 162 of file TraceInteract.java.

                                                                                   {
                unpublishTracingService(DEFAULT_TM_AID, applicantAgent, serviceName);
        }
static void es.upv.dsic.gti_ia.trace.TraceInteract.unpublishTracingService ( AgentID  tms_aid,
BaseAgent  applicantAgent,
String  serviceName 
) throws TraceServiceNotAllowedException [static]

Unpublish a tracing service.

Unpublish a previously published tracing service so that other agents cannot subscribe nor receive the corresponding trace events from the applicantAgent (if there were more providers of the tracing service, subscribers would still be able to receive trace events of that tracing service generated by these other providers.

This method communicates via ACL with the trace manager entity specified by the parameter tms_aid. To interact with the default trace manager entity in localhost ("qpid://TM@localhost:8080"), use the method es.upv.dsic.gti_ia.trace.TraceInteract#unpublishTracingService(BaseAgent applicantAgent, String serviceName)

Parameters:
tms_aidAgentID of the trace manager entity which is being sent the unpublication request
applicantAgentAgent which wants to unpublish the tracing service
serviceNameName of the tracing service which is to be unpublished
Exceptions:
TraceServiceNotAllowedExceptionif the custom tracing services are not allowed

Definition at line 193 of file TraceInteract.java.

                                                               {
                TraceMask traceMask = applicantAgent.getTraceMask();
                // If the custom tracing services are not allowed.
                if (traceMask.get(TraceMask.CUSTOM) == false) {
                        throw new TraceServiceNotAllowedException();
                } else {
                        String body = UNPUBLISH_LABEL + SEPARATION_CHAR + serviceName;
                        sendACLMessage(applicantAgent, ACLMessage.REQUEST, tms_aid, body);
                }
        }

Member Data Documentation

Definition at line 31 of file TraceInteract.java.


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