Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.controls.events.generic
Interface GenericEventControl

All Superinterfaces
  Serializable

    @ControlInterface
    public interface GenericEventControl

extends Serializable

Control from which non-tracking events may be configured, generated, and dispatched to the event service. A tracked event is one which may be persisted to the Portal BT_EVENT database tables. So these events are generally not persisted, unless you have implemented your own event listener and persistence classes. Refer to the Portal documentation for details on how to configure the Event Service.
The Event object is created when this control is instantiated, with the name of the event type specified as the control property. You may then add additional attributes to the event with these control methods, and dispatch the event once (if) the event has been configured. It is not required to configure the event with additional attributes before dispatching it.
This control is NOT to be used with JWS, as it requires the HttpServletRequest object, which is unavailable from a JWS.
Control properties:

- eventType The type of event, eg "FooEvent", or "MyShoppingEvent".

See Also
  `Event`, `EventService`

Nested Class Summary
`static interface` | `GenericEventControl.GenericEventParams` Define the properties for this control.

Method Summary
`void` | `dispatch()` Create and dispatch a non-trackable event.
`Object` | `getAttribute(String theKey)` Get named event attribute.
`Iterator` | `getAttributeNames()` Return the attribute names that have been set on this event.
`Object` | `removeAttribute(String theKey)` Remove the attribute.
`void` | `setAttribute(String theKey, Serializable theValue)` Set a named event attribute.

Method Detail

### setAttribute

    void setAttribute(String theKey,
                      Serializable theValue)

  Set a named event attribute.

  Parameters
    `theKey` - the attribute name. Can not be null.
    `theValue` - the value of the attribute.
  Throws
    `NullPointerException` - if theKey is null.

### removeAttribute

    Object removeAttribute(String theKey)

  Remove the attribute.

  Parameters
    `theKey` - the attribute name.
  Returns
    previous value associated with theKey, or null if there was no mapping for theKey.

### getAttribute

    Object getAttribute(String theKey)

  Get named event attribute.

  Returns
    value associated with theKey, or null if there was no mapping for theKey.

### getAttributeNames

    Iterator getAttributeNames()

  Return the attribute names that have been set on this event. This iterator provides a "read-only" view of the attributes - remove is not supported.

### dispatch

    void dispatch()
                  throws P13nControlException

  Create and dispatch a non-trackable event. The event type is specified as a property on this control.

  Throws
    `P13nControlException`

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.