Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.tracking.listeners
Class BehaviorTrackingListener

    java.lang.Object
      com.bea.p13n.tracking.listeners.BehaviorTrackingListener

All Implemented Interfaces
  EventListener

    public class BehaviorTrackingListener

extends Object
implements EventListener

EventListener to handle all behavior tracking events. Events are persisted to the database. This class should be added to the property eventService.listeners in order to enable behavior tracking.

Constructor Summary
`BehaviorTrackingListener()` Construct an instance of the listener and populate the eventTypes array with the event types that this listener will listen for.

Method Summary
`boolean` | `equals(Object theOther)` Implementation of equals so multiple listeners won't be added to the same handler.
`String[]` | `getTypes()` This method lets the EventListener advertise what types it is interested in.
`void` | `handleEvent(Event theEvent)` Handle the event.
`int` | `hashCode()` Returns a hash code value for the object.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BehaviorTrackingListener

    public BehaviorTrackingListener()

  Construct an instance of the listener and populate the eventTypes array with the event types that this listener will listen for.

Method Detail

### getTypes

    public String[] getTypes()

  Description copied from interface: `EventListener`
  This method lets the EventListener advertise what types it is interested in. It is used by the EventHandler to dispatch only Events with a matching type to this EventListener. To listen on all events, implement this method to return a String[1] containing EventConstants.TYPE_ALL. Must not return null or return null in any element.

  Specified by:
    `getTypes` in interface `EventListener`
  Returns
    the event types that are specified (in application-config.xml) and are to be persisted to the database.

### handleEvent

    public void handleEvent(Event theEvent)

  Handle the event. Ensure that it is an instanceof TrackingEvent and add it to a Buffer which will be swept to the database.

  Specified by:
    `handleEvent` in interface `EventListener`
  Parameters
    `theEvent` - subclass of TrackingEvent to be written to the database

### equals

    public boolean equals(Object theOther)

  Implementation of equals so multiple listeners won't be added to the same handler. All listeners of the same class are considered equal.

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by `java.util.Hashtable`.

  Overrides:
    `hashCode` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 BEA Systems, Inc. All Rights Reserved