WebObjects 5.2.3

com.webobjects.appserver
Class WOEvent

java.lang.Object
  extended bycom.webobjects.eocontrol.EOEvent
      extended bycom.webobjects.appserver.WOEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
WOApplication.Event, WOAssociation.Event, WOComponent.Event

public class WOEvent
extends EOEvent

WOEvent is a subclass of EOEvent (defined in the EOControl framework) that serves as the parent class for objects that gather information –such as duration –about various operations in WebObjects. You can see the results of this information gathering in your web browser by accessing a special "event display" page, and you can configure how the results are displayed by accessing a special "event setup" page. Both of these are accessed through special direct actions (WOEventDisplay and WOEventSetup, respectively). For example, if you've been running the CreatePlot example, the following URL will access the event display page

http://localhost/cgi-bin/WebObjects/CreatePlot.woa/wa/WOEventDisplay
This goes through a password protected login, and the password must be specified using the EOEventLoggingPassword property. WOEvent adds knowledge of pages and components to the EOEvent class. Events that are subclasses of WOEvent can be grouped or aggregated by page or by component. Although you can subclass WOEvent, in most cases the following private subclasses will be adequate for analyzing WebObjects applications:

Event Group Logged Events
WOApplication Event pageWithName
WOAssociation Event valueForKeyPath, takeValueForKeyPath
WOComponent Event takeValuesFromRequest, invokeAction, appendToResponse, awake, sleep
WOComponentReference Event pushComponent

See Also:
Serialized Form

Field Summary
static int AssociationSignature
          Integer representing an association signature.
static int ComponentSignature
          Integer representing a WOComponent name signature.
static int PageSignature
          Integer representing a page name signature.
 
Fields inherited from class com.webobjects.eocontrol.EOEvent
BasicEventSignature, EventGroupName
 
Constructor Summary
WOEvent()
           
 
Method Summary
 String comment()
          Special information on the event.
 void setComponentName(String aComponentName)
          Sets the event's component name to aComponentName.
 void setPageName(String aPageName)
          Sets the event's page name to aPageName.
 String signatureOfType(int aType)
          The returned signatures are used to group or aggregate data on the WOEventDisplay page.
 String title()
          Required for proper functioning of the event logging display.
 String toString()
          Returns a String that includes the receiver's title, comment, and duration or start date (whichever is appropriate).
 
Methods inherited from class com.webobjects.eocontrol.EOEvent
aggregateEvents, classDescription, compare, description, displayComponentName, duration, durationWithoutSubevents, eventTypeDescriptions, groupEvents, info, markAtomicWithInfo, markEnd, markStartWithInfo, parentEvent, setInfo, setType, startDate, subevents, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AssociationSignature

public static final int AssociationSignature
Integer representing an association signature.

See Also:
signatureOfType(int), Constant Field Values

ComponentSignature

public static final int ComponentSignature
Integer representing a WOComponent name signature.

See Also:
signatureOfType(int), Constant Field Values

PageSignature

public static final int PageSignature
Integer representing a page name signature.

See Also:
signatureOfType(int), Constant Field Values
Constructor Detail

WOEvent

public WOEvent()
Method Detail

comment

public String comment()
Special information on the event. In the default implementation, this method returns the description of the "info" instance variable which is passed at log time. This method can be overridden by subclasses to provide information for the event display.

Overrides:
comment in class EOEvent
Returns:
the description of the "info" instance variable
See Also:
EOEvent.info()

setComponentName

public void setComponentName(String aComponentName)
Sets the event's component name to aComponentName. Event data can be grouped or aggregated according to the component name.

Parameters:
aComponentName - the specified name of the WOComponent

setPageName

public void setPageName(String aPageName)
Sets the event's page name to aPageName. Event data can be grouped or aggregated according to the page name.

Parameters:
aPageName - name of the the event's page

signatureOfType

public String signatureOfType(int aType)
The returned signatures are used to group or aggregate data on the WOEventDisplay page. WOEvent is able to generate signatures for the following types:

Type Signature
EOBasicEventSignature A combination of the event's type and the component name
WOComponentSignature The component name
WOPageSignature The page name
WOAssociationSignature varies based upon the context

Override this method if you are creating a custom subclass of WOEvent and need to provide signatures for additional event types.

Overrides:
signatureOfType in class EOEvent
Parameters:
aType - typecode of the receiver for the signature to be returned
Returns:
a signature corresponding to the typecode of the receiver
See Also:
EOEvent.BasicEventSignature, EOEvent.aggregateEvents(NSArray, int), EOEvent.groupEvents(NSArray, int)

title

public String title()
Required for proper functioning of the event logging display.

Overrides:
title in class EOEvent
Returns:
the title value from the EventTypeDescriptions dictionary
See Also:
EOEvent.type(), EOEvent.eventTypeDescriptions(Class)

toString

public String toString()
Description copied from class: EOEvent
Returns a String that includes the receiver's title, comment, and duration or start date (whichever is appropriate).

Overrides:
toString in class EOEvent
Returns:
a String representation of the receiver

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.