All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class magician.PerfTools.NetEvent

java.lang.Object
   |
   +----magician.PerfTools.NetEvent

public class NetEvent
extends Object
NetEvent is an interface used to ineract with the EventManager. Classes using this interface must override the updateEventFields method to add fields that the user wants to record. The event is written out using the print method. The actual format of the format is determined by the user. See @see NetLoggerEvent for an example of recording and displaying events in the NetLogger format.

See Also:
EventManager, NetLoggerEvent

Variable Index

 o eventDescriptor
 o extraFields
 o PacketID
 o timeStamp
 o traceLevel

Constructor Index

 o NetEvent()
initializes the event

Method Index

 o getEventTime()
get event time
 o getEventType()
get event name
 o getOtherEventFields()
get other fields for the event as a string
 o getPacketID()
get identifier of packet that caused the event to be logged.
 o updateEventFields(int, String, long, long)
updates the fields with the passed parameter values.
 o updateEventFields(int, String, long, long, String)
updates the fields with the passed parameter values.

Variables

 o eventDescriptor
 protected String eventDescriptor
 o traceLevel
 int traceLevel
 o PacketID
 protected long PacketID
 o timeStamp
 protected long timeStamp
 o extraFields
 protected String extraFields

Constructors

 o NetEvent
 public NetEvent()
initializes the event

Methods

 o getEventType
 public String getEventType()
get event name

Returns:
s the event name as a String
 o getEventTime
 public long getEventTime()
get event time

Returns:
s time in milliseconds
 o getPacketID
 public long getPacketID()
get identifier of packet that caused the event to be logged.

Returns:
s packet id or 0 if event was logged independent of any packet
 o getOtherEventFields
 public String getOtherEventFields()
get other fields for the event as a string

Returns:
s string containing remaining fields
 o updateEventFields
 public void updateEventFields(int traceDepth,
                               String EventType,
                               long timeStamp,
                               long PacketID,
                               String otherParams)
updates the fields with the passed parameter values. Additional fields may be passed in the form of a String.

Parameters:
traceDepth - trace level for event
EventType - a string describing the event in period-separated format
timeStamp - the time at which the event occured
packetID - the ID of the packet for which the event is logged
otherParams - any additional fields
 o updateEventFields
 public void updateEventFields(int traceDepth,
                               String EventType,
                               long timeStamp,
                               long PacketID)
updates the fields with the passed parameter values. Additional fields may be passed in the form of a String.

Parameters:
EventType - a string describing the event in period-separated format
timeStamp - the time at which the event occured
packetID - the ID of the packet for which the event is logged

All Packages  Class Hierarchy  This Package  Previous  Next  Index
1