- Inherits from:
- NSObject
- Package:
- com.apple.yellow.eocontrol
EOEvent is an abstract class that provides concrete subclasses with a structure for storing information (such as duration) about a logged event.
Note: This class doesn't exist in the com.apple.client.eocontrol package. The event logging system is not available for Java Client. In a Java Client application, you can view event logging information for the server side of the application, but not on the client side. |
Subclasses of EOEvent don't need to override any inherited methods or implement any methods at all. You can customize the behavior if you want, but the EOEvent implementations are sufficient for most cases. Generally, to create a subclass of EOEvent, you merely declare it and create a description file that defines the events your subclass logs. The class itself usually declares no instance variables and implements no methods. The abstract implementation gets all the information it needs from the description file. For more information on the description file, see the eventTypeDescriptions method description.
Most of the work involved in logging custom events is instrumenting your code. For more information on that and on the event logging system itself, see the EOEventCenter class specification.
EOAttribute defines the following int
constant
as a possible signature type for use with the methods signatureOfType, aggregateEvents,
and groupEvents.
Additionally, EOEvent defines the following String
constant to be used as a key into the dictionary returned by eventTypeDescriptions.
The EOEventGroupName
entry
provides the description of the family of events represented by
the event class.
- Defining an event type
- eventTypeDescriptions
- description
- Accessing information about the event
- toString
- title
- startDate
- duration
- durationWithoutSubevents
- setType
- type
- setInfo
- info
- comment
- Grouping and Aggregating Events
- aggregateEvents
- groupEvents
- signatureOfType
- Displaying event information
- displayComponentName
- Traversing the event hierarchy
- parentEvent
- subevents
- Logging events
- markAtomicWithInfo
- markEnd
- markStartWithInfo
public static NSArray
aggregateEvents
(
NSArray events,
int tag)
This method is for use by the WOEventDisplay page. For more information, see "WOEventDisplay page".
public static String
description
()
public static NSDictionary
eventTypeDescriptions
()
EOEvent's implementation reads the event types and their descriptions from a file. To define the types your event class represents, create a description file for your event and add it to your project's Resources folder. An event's description file defines the event categories and subcategories used in the WOEventDisplay page. The file's contents is a dictionary in plist format.
For example, consider the ODBCAdaptorEvent
that logs events for the ODBC adaptor. ODBCAdaptorEvent is a subclass
of EOEvent. It uses EOEvent's implementation of eventTypeDescriptions
.
The name of its description file is ODBCAdaptorEvent.description,
and it looks like this:
{ EOEventGroupName = "ODBC Adaptor Event"; connect = "Connect"; openChannel = "Open Channel"; evaluateExpression = "Evaluate Expression"; fetchRow = "Fetch Row"; commitTransaction = "Commit Transaction"; }
Using the EOEvent
implementation, the EOEventGroupName entry
is mandatory; it describes the family of events logged by the event
class. Any other keys are defined by the event class itself. In
the ODBCAdaptorEvent class, the other keys (connect
, openChannel
,
and so on) are the types of the events ODBCAdaptorEvent
logs.
If the file doesn't exist or if there's an
error reading the file, EOEvent creates a dictionary with a single entry;
the entry's key is EOEventGroupName
and
the value is the name of the event class (such as ODBCAdaptorEvent).
public static NSArray
groupEvents
(
NSArray events,
int tag)
This method is for use by the WOEventDisplay page. For more information, see "WOEventDisplay page".
public String
comment
()
public String
displayComponentName
()
public int
duration
()
public int
durationWithoutSubevents
()
public Object
info
()
public void
markAtomicWithInfo
(Object info)
Note: Don't invoke this method directly. Use the corresponding method defined in EOEventCenter instead. |
public void
markEnd
()
Note: Don't invoke this method directly. Use the corresponding method defined in EOEventCenter instead. |
public void
markStartWithInfo
(Object info)
Note: Don't invoke this method directly. Use the corresponding method defined in EOEventCenter instead. |
public EOEvent
parentEvent
()
public void
setInfo
(Object info)
equals
and toString
.public void
setType
(String type)
public Object
signatureOfType
(int tag)
See Also: aggregateEvents, groupEvents
public NSGregorianDate
startDate
()
public NSArray
subevents
()
public String
title
()
eventTypeDescriptions
dictionary
for the receiver's type, EOEvent's implementation returns the
name of the receiver's class.toString
public String
toString
()
public String
type
()