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

List of all members.

Public Member Functions

 TraceEvent ()
 TraceEvent (String tService, TracingEntity originEntity, String content)
 TraceEvent (String tService, AgentID originAid, String content)
void setTracingService (String tService)
void setTimestamp (long timestamp)
void setOriginEntity (TracingEntity originEntity)
void setContent (String content)
String getTracingService ()
TracingEntity getOriginEntity ()
String getContent ()
long getTimestamp ()
String toReadableString ()

Detailed Description

Definition of Trace Event.

Author:
L Burdalo (lburdalo@dsic.upv.es)

Definition at line 14 of file TraceEvent.java.


Constructor & Destructor Documentation

Void constructor which sets all attributes to null except for es.upv.dsic.gti_ia.core.TraceEvent#timestamp, which is set to -1

Definition at line 42 of file TraceEvent.java.

                           {
                this.tService=null;
                this.originEntity=null;
                this.timestamp=-1;
                this.content=null;
        }
es.upv.dsic.gti_ia.core.TraceEvent.TraceEvent ( String  tService,
TracingEntity  originEntity,
String  content 
)

Creates a new trace event and sets its attributes according to the specified parameters, except for es.upv.dsic.gti_ia.core.TraceEvent#timestamp, which is set to the current time using java.lang.System#currentTimeMillis()

Parameters:
tServiceTracing service name
originEntityTracing entity which originated the trace event
contentContent of the trace event
See also:
java.lang.System::currentTimeMillis()

Definition at line 61 of file TraceEvent.java.

                                                                                      {
                this.tService=tService;
                this.originEntity=originEntity;
                this.timestamp=System.currentTimeMillis();
                this.content=content;
        }
es.upv.dsic.gti_ia.core.TraceEvent.TraceEvent ( String  tService,
AgentID  originAid,
String  content 
)

Creates a new trace event and sets its attributes according to the specified parameters, except for es.upv.dsic.gti_ia.core.TraceEvent#timestamp, which is set to java.lang.System#currentTimeMillis() A new tracing entity is created for the specified AgentID

Parameters:
tServiceTracing service name
originAidAgentID of the tracing entity which originated the trace event
contentContent of the trace event
See also:
java.lang.System::currentTimeMillis()
es.upv.dsic.gti_ia.core.AgentID

Definition at line 81 of file TraceEvent.java.

                                                                             {
                this.tService=tService;
                this.originEntity=new TracingEntity(TracingEntity.AGENT, originAid);
                this.timestamp=System.currentTimeMillis();
                this.content=content;
        }

Member Function Documentation

Returns the content of the trace event.

Returns:
content Content of the trace event

Definition at line 147 of file TraceEvent.java.

                                  {
                return this.content;
        }

Returns the origin entity of the trace event.

Returns:
originEntity Tracing entity which originated the trace event

Definition at line 138 of file TraceEvent.java.

                                              {
                return this.originEntity;
        }

Returns the time stamp of the trace event.

Returns:
timestamp Time at which the trace event was generated

Definition at line 156 of file TraceEvent.java.

                                  {
                return this.timestamp;
        }

Returns the tracing service of the trace event.

Returns:
tService Name of the tracing Service

Definition at line 129 of file TraceEvent.java.

                                         {
                return this.tService;
        }

Sets the content of the trace event to the specified one.

Parameters:
contentContent of the trace event

Definition at line 120 of file TraceEvent.java.

                                              {
                this.content=content;
        }

Sets the origin entity of the trace event to the specified one.

Parameters:
originEntityTracing entity which originated the trace event

Definition at line 111 of file TraceEvent.java.

                                                               {
                this.originEntity=originEntity;
        }

Sets the time stamp of the trace event to the specified one.

Parameters:
timestampTime at which the trace event was thrown

Definition at line 102 of file TraceEvent.java.

                                                {
                this.timestamp=timestamp;
        }

Sets the tracing service of the trace event to the specified one.

Parameters:
tServiceName of the tracing service

Definition at line 93 of file TraceEvent.java.

                                                      {
                this.tService=tService;
        }

Converts the trace event to a human readable string.

Returns:
A readable string containing all information of the trace event
See also:
es.upv.dsic.gti_ia.trace.TracingEntity::toReadableString()

Definition at line 167 of file TraceEvent.java.

                                         {
                String event_str = String.valueOf(this.getTimestamp()) + ": " +
                        this.getTracingService() + " from " + this.getOriginEntity().toReadableString() + " Content: " +
                        this.getContent();
                
                return event_str;
        }

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