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

## oracle.ifs.core.handlers
Class AuditEventHandlerAdapter

    java.lang.Object
      oracle.ifs.core.handlers.AuditEventHandlerAdapter

All Implemented Interfaces:
  AuditEventHandler

Direct Known Subclasses:
  CrawlerHandler, InterMediaAnnotationHandler, RuntimeStateHandler, ScriptHandler

    public class AuditEventHandlerAdapter

extends java.lang.Object
implements AuditEventHandler

AuditEventHandlerAdapter provides a base implementation of the AuditEventHandler interface, and provides implementations for common operations needed by specific AuditEventHandler implementations.

Constructor Summary
`AuditEventHandlerAdapter()`

Method Summary
`protected int` | `deleteEvents(AuditEventHandlerContext context, long maxId)` Deletes all events for this handler's AuditSpecification, up to and including the specified maximum event ID.
`void` | `handleDispose(AuditEventHandlerContext context)` Called when the AuditEventHandler instance will no longer be used.
`void` | `handleEventPosted(AuditEventHandlerContext context)` Called when at least one registered event is posted.
`void` | `handleInitialize(AuditEventHandlerContext context)` Initializes this handler.
`void` | `handleTimerExpired(AuditEventHandlerContext context)` Called when the timer for this AuditEventHandler expires.
`protected AuditEvent[]` | `selectEvents(AuditEventHandlerContext context, java.lang.String[] eventTypes, java.lang.Long maxId, int batchSize)` Selects all events for this handler's AuditSpecification, up to and including the specified maximum event ID, filtered by the specified event types.
`protected long` | `selectMaximumEventId(AuditEventHandlerContext context)` Selects the maximum event ID in use in this handler's AuditSpecification.

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

Constructor Detail

### AuditEventHandlerAdapter

    public AuditEventHandlerAdapter()

Method Detail

### handleInitialize

    public void handleInitialize(AuditEventHandlerContext context)
                          throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Initializes this handler.

  Called immediately after construction.

  Specified by:
    `handleInitialize` in interface `AuditEventHandler`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### handleEventPosted

    public void handleEventPosted(AuditEventHandlerContext context)
                           throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Called when at least one registered event is posted.

  Specified by:
    `handleEventPosted` in interface `AuditEventHandler`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### handleTimerExpired

    public void handleTimerExpired(AuditEventHandlerContext context)
                            throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Called when the timer for this AuditEventHandler expires.

  Specified by:
    `handleTimerExpired` in interface `AuditEventHandler`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### handleDispose

    public void handleDispose(AuditEventHandlerContext context)
                       throws java.lang.Exception

  Description copied from class: `AuditEventHandlerAdapter`
  Called when the AuditEventHandler instance will no longer be used.

  The instance should release any resources it is holding that would not be automatically released as part of the object's garbage collection.

  Specified by:
    `handleDispose` in interface `AuditEventHandler`
  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Throws:
    `java.lang.Exception` - if the operation fails

### selectMaximumEventId

    protected long selectMaximumEventId(AuditEventHandlerContext context)
                                 throws IfsException

  Description copied from class: `AuditEventHandlerAdapter`
  Selects the maximum event ID in use in this handler's AuditSpecification.

  This event ID can be used during event or timer notification processing, so that processing occurs only the events posted up until the time the maximum event ID is determined, avoiding any race conditions with new events being posted during the processing.

  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
  Returns:
    the maximum event ID in existence, or -1 if there are no events in the AuditSpecification
  Throws:
    `IfsException` - if the operation fails

### selectEvents

    protected AuditEvent[] selectEvents(AuditEventHandlerContext context,
                                        java.lang.String[] eventTypes,
                                        java.lang.Long maxId,
                                        int batchSize)
                                 throws IfsException

  Description copied from class: `AuditEventHandlerAdapter`
  Selects all events for this handler's AuditSpecification, up to and including the specified maximum event ID, filtered by the specified event types.

  If a null or empty array is specified for the event types, all types are selected.

  The array of returned events is sorted by event ID.

  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
    `eventTypes` - the event types of interest
    `maxId` - the maximum event ID in existence; if null, do not use any maximum ID constraint
    `batchSize` - the batch size
  Returns:
    the events that meet the search criteria
  Throws:
    `IfsException` - if the operation fails

### deleteEvents

    protected int deleteEvents(AuditEventHandlerContext context,
                               long maxId)
                        throws IfsException

  Description copied from class: `AuditEventHandlerAdapter`
  Deletes all events for this handler's AuditSpecification, up to and including the specified maximum event ID.

  Parameters:
    `context` - the AuditEventHandlerContext to use for processing
    `maxId` - the maximum event ID in existence
  Returns:
    the number of events deleted
  Throws:
    `IfsException` - if the operation fails

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