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.agents
Class EventHandlerAgent.InternalHandler

    java.lang.Object
      oracle.ifs.core.agents.EventHandlerAgent.InternalHandler

All Implemented Interfaces:
  AuditEventHandlerContext

Enclosing class:
  EventHandlerAgent

    public class EventHandlerAgent.InternalHandler

extends java.lang.Object
implements AuditEventHandlerContext

Holds handler inforamtion about a registered AuditSpecification and manages the notifications to the associated custom internal handler.

Field Summary
`protected LibrarySession` | `m_AcquiredLibrarySession` The LibrarySession acquired from the session pool.
`protected java.util.ArrayList` | `m_AuxiliaryLibrarySessionList` The list of auxiliary LibrarySessions acquired from the session pool.
`protected oracle.ifs.core.agents.EventHandlerAgent.EventPostedTask` | `m_CurrentEventPostedTask` The current EventPostedTask being processed by the handler.
`protected boolean` | `m_Deactivated` The indication as to whether this handler has been deactived.
`protected EventHandlerAgent.EventHandlerExecutor` | `m_EventHandlerExecutor` The AuditEventHandler executor; to handle notifications for the handler in a dedicated thread.
`protected EventHandlerAgent.RegisteredAuditSpecification` | `m_RegisteredAuditSpecification` The referencing RegisteredAuditSpecification.

Constructor Summary
`protected` | `EventHandlerAgent.InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras)` Constructs an InternalHandler, without a handler.
`protected` | `EventHandlerAgent.InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras, AuditEventHandler handler)` Constructs a InternalHandler.

Method Summary
`LibrarySession` | `acquireAuxiliarySession()` Acquires an additional session context to use for processing.
`protected void` | `acquireSession()` Acquire a LibrarySession from the LibrarySession pool.
`protected void` | `alert(long minEventId)` Handles alert for new history for the registered AuditSpecification.
`protected void` | `clearDomainContext(LibrarySession session)` Clear the domain context on the specified session.
`protected void` | `deactivate()` De-activates the handler, as result of the referenced AuditSpecification being deleted or invalidated.
`AuditSpecification` | `getAuditSpecification()` Returns the custom Audit Specification corresponding to the "Audit History" associated with this handler, indicating where the AuditEvents are posted.
`protected AuditSpecification` | `getAuditSpecification(LibrarySession session)` Gets the AuditSpecification
`java.lang.Long` | `getAuditSpecificationId()` Returns the custom Audit Specification ID corresponding to the "Audit History" associated with this handler, indicating where the AuditEvents are posted.
`AttributeValue` | `getHandlerProperty(java.lang.String key)` Gets a property of the custom Audit Specification by its property name.
`LibrarySession` | `getLibrarySession()` Returns the session context to use for processing.
`long` | `getMinimumDispatchedEventId()` Returns the minimum event ID encountered when AuditEvents were last dispatched in the handler.
`long` | `getNextSequenceId()` Returns the next sequence ID value that would have been leveraged for a new Object created in the repository.
`AttributeValue` | `getNodeProperty(java.lang.String key)` Gets a property of the running Node context.
`AttributeValue` | `getServerProperty(java.lang.String key)` Gets a property of the running Server context.
`boolean` | `handleRuntimeStateEvent(LibrarySession session, AuditEvent event)` Handle a RuntimeState AuditEvent.
`protected void` | `initialize(LibrarySession session)` Initializes a InternalHandler.
`boolean` | `isDeactivated()` Determines whether a deactivation has occurred for this handler, indicated that it should complete processing the current operation as soon as possible.
`protected void` | `markDisposed()` De-activates the handler, as result of the referenced AuditSpecification being deleted or invalidated.
`void` | `purgeEvent(AuditEvent event)` Purges an AuditEvent from its audit history.
`void` | `purgeEvents(AuditEvent[] events)` Purges a set of AuditEvents from their audit histories.
`protected void` | `releaseSession()` Release a LibrarySession back to the LibrarySession pool.
`void` | `removeHandlerProperty(java.lang.String key)` Removes a property of the custom Audit Specification by its property name.
`void` | `restartAuditEventHandler()` Causes a reset of the handler settings.
`protected void` | `setCurrentEventPostedTask(oracle.ifs.core.agents.EventHandlerAgent.EventPostedTask task)` Sets the current EventPostedTask being processed.
`void` | `setDomainId(long domainId)` Sets the Domain that should be used while processing an AuditEvent.
`void` | `setHandlerProperty(java.lang.String key, AttributeValue value)` Sets a property of the custom Audit Specification.
`protected void` | `timerExpired()` Handles timer expiration for the registered AuditSpecification.
`java.lang.String` | `toString()`

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

Field Detail

### m_RegisteredAuditSpecification

    protected EventHandlerAgent.RegisteredAuditSpecification m_RegisteredAuditSpecification

  Description copied from class: `EventHandlerAgent.InternalHandler`
  The referencing RegisteredAuditSpecification.

### m_EventHandlerExecutor

    protected EventHandlerAgent.EventHandlerExecutor m_EventHandlerExecutor

  Description copied from class: `EventHandlerAgent.InternalHandler`
  The AuditEventHandler executor; to handle notifications for the handler in a dedicated thread.

### m_AcquiredLibrarySession

    protected LibrarySession m_AcquiredLibrarySession

  Description copied from class: `EventHandlerAgent.InternalHandler`
  The LibrarySession acquired from the session pool.

### m_AuxiliaryLibrarySessionList

    protected java.util.ArrayList m_AuxiliaryLibrarySessionList

  Description copied from class: `EventHandlerAgent.InternalHandler`
  The list of auxiliary LibrarySessions acquired from the session pool.

### m_CurrentEventPostedTask

    protected oracle.ifs.core.agents.EventHandlerAgent.EventPostedTask m_CurrentEventPostedTask

  Description copied from class: `EventHandlerAgent.InternalHandler`
  The current EventPostedTask being processed by the handler.

### m_Deactivated

    protected boolean m_Deactivated

  Description copied from class: `EventHandlerAgent.InternalHandler`
  The indication as to whether this handler has been deactived.

Constructor Detail

### EventHandlerAgent.InternalHandler

    protected EventHandlerAgent.InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras)
                                         throws IfsException

  Constructs an InternalHandler, without a handler.

  Used by the other constructor variants.

  Parameters:
    `ras` - the registered AuditSpecification
  Throws:
    `IfsException` - if the operation fails

### EventHandlerAgent.InternalHandler

    protected EventHandlerAgent.InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras,
                                                AuditEventHandler handler)
                                         throws IfsException

  Constructs a InternalHandler.

  Parameters:
    `ras` - the registered AuditSpecification
    `handler` - the AuditEventHandler
  Throws:
    `IfsException` - if the operation fails

Method Detail

### initialize

    protected void initialize(LibrarySession session)
                       throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Initializes a InternalHandler.

  Parameters:
    `session` - the agent thread's session context
  Throws:
    `IfsException` - if the operation fails

### getAuditSpecification

    protected AuditSpecification getAuditSpecification(LibrarySession session)
                                                throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Gets the AuditSpecification

  Parameters:
    `session` - the session context
  Returns:
    the AuditSpecification
  Throws:
    `IfsException` - if the operation fails

### clearDomainContext

    protected void clearDomainContext(LibrarySession session)

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Clear the domain context on the specified session.

  Parameters:
    `session` - the session for which to clear the domain context

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### deactivate

    protected void deactivate()
                       throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  De-activates the handler, as result of the referenced AuditSpecification being deleted or invalidated.

  Throws:
    `IfsException` - if the operation fails

### markDisposed

    protected void markDisposed()
                         throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  De-activates the handler, as result of the referenced AuditSpecification being deleted or invalidated.

  Throws:
    `IfsException` - if the operation fails

### alert

    protected void alert(long minEventId)
                  throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Handles alert for new history for the registered AuditSpecification.

  Parameters:
    `minEventId` - minimum event ID encountered by disptacher
  Throws:
    `IfsException` - if the operation fails

### timerExpired

    protected void timerExpired()
                         throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Handles timer expiration for the registered AuditSpecification.

  Throws:
    `IfsException` - if the operation fails

### acquireSession

    protected void acquireSession()
                           throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Acquire a LibrarySession from the LibrarySession pool.

  Invoked in call() impl of all tasks that invoke methods on the handler interface.

  Throws:
    `IfsException` - if the operation fails

### releaseSession

    protected void releaseSession()
                           throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Release a LibrarySession back to the LibrarySession pool.

  Invoked in call() impl of all tasks that invoke methods on the handler interface.

  Throws:
    `IfsException` - if the operation fails

### setCurrentEventPostedTask

    protected void setCurrentEventPostedTask(oracle.ifs.core.agents.EventHandlerAgent.EventPostedTask task)

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Sets the current EventPostedTask being processed.

  Parameters:
    `task` - the EventPostedTask being processed.
  Throws:
    `IfsException` - if the operation fails

### getLibrarySession

    public LibrarySession getLibrarySession()

  Description copied from interface: `AuditEventHandlerContext`
  Returns the session context to use for processing.

  Specified by:
    `getLibrarySession` in interface `AuditEventHandlerContext`
  Returns:
    the session context to use for processing

### acquireAuxiliarySession

    public LibrarySession acquireAuxiliarySession()
                                           throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Acquires an additional session context to use for processing.

  Specified by:
    `acquireAuxiliarySession` in interface `AuditEventHandlerContext`
  Returns:
    the new session context
  Throws:
    `IfsException` - if the operation fails

### getAuditSpecificationId

    public java.lang.Long getAuditSpecificationId()

  Description copied from interface: `AuditEventHandlerContext`
  Returns the custom Audit Specification ID corresponding to the "Audit History" associated with this handler, indicating where the AuditEvents are posted.

  Use this ID when using `AuditingUtilities.searchAuditHistory` to find AuditEvents that have occurred that are of interest to this handler.

  Specified by:
    `getAuditSpecificationId` in interface `AuditEventHandlerContext`
  Returns:
    the ID of the Audit Specification

### getAuditSpecification

    public AuditSpecification getAuditSpecification()
                                             throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Returns the custom Audit Specification corresponding to the "Audit History" associated with this handler, indicating where the AuditEvents are posted.

  Specified by:
    `getAuditSpecification` in interface `AuditEventHandlerContext`
  Returns:
    the Audit Specification
  Throws:
    `IfsException` - if the operation fails

### getMinimumDispatchedEventId

    public long getMinimumDispatchedEventId()
                                     throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Returns the minimum event ID encountered when AuditEvents were last dispatched in the handler.

  Specified by:
    `getMinimumDispatchedEventId` in interface `AuditEventHandlerContext`
  Returns:
    the minimum dispatched event ID
  Throws:
    `IfsException` - if the operation fails

### getHandlerProperty

    public AttributeValue getHandlerProperty(java.lang.String key)
                                      throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Gets a property of the custom Audit Specification by its property name.

  Specified by:
    `getHandlerProperty` in interface `AuditEventHandlerContext`
  Parameters:
    `key` - the Audit Specification property key
  Returns:
    the property value, or null if not defined
  Throws:
    `IfsException` - if the operation fails

### setHandlerProperty

    public void setHandlerProperty(java.lang.String key,
                                   AttributeValue value)
                            throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Sets a property of the custom Audit Specification.

  Specified by:
    `setHandlerProperty` in interface `AuditEventHandlerContext`
  Parameters:
    `key` - the Audit Specification property key
    `value` - the Audit Specification property value
  Throws:
    `IfsException` - if the operation fails

### removeHandlerProperty

    public void removeHandlerProperty(java.lang.String key)
                               throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Removes a property of the custom Audit Specification by its property name.

  Specified by:
    `removeHandlerProperty` in interface `AuditEventHandlerContext`
  Parameters:
    `key` - the Audit Specification property key
  Throws:
    `IfsException` - if the operation fails

### getServerProperty

    public AttributeValue getServerProperty(java.lang.String key)
                                     throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Gets a property of the running Server context.

  Specified by:
    `getServerProperty` in interface `AuditEventHandlerContext`
  Parameters:
    `key` - the Server property key
  Returns:
    the property value, or null if not defined
  Throws:
    `IfsException` - if the operation fails

### getNodeProperty

    public AttributeValue getNodeProperty(java.lang.String key)
                                   throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Gets a property of the running Node context.

  Specified by:
    `getNodeProperty` in interface `AuditEventHandlerContext`
  Parameters:
    `key` - the Node property key
  Returns:
    the property value, or null if not defined
  Throws:
    `IfsException` - if the operation fails

### setDomainId

    public void setDomainId(long domainId)
                     throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Sets the Domain that should be used while processing an AuditEvent.

  By default, this is the default Domain. In a multi-Domain instance, this must be set to the ID of the Domain for the AuditEvent that is being processed, because an AuditEventHandler will be invoked for Events that have occurred in any Domain in the instance.

  A value of zero for the Domain ID will effectively clear the previously established Domain context.

  Specified by:
    `setDomainId` in interface `AuditEventHandlerContext`
  Parameters:
    `domainId` - the ID of the Domain to use while processing an Event or zero to clear the previously established Domain context
  Throws:
    `IfsException` - if the operation fails

### restartAuditEventHandler

    public void restartAuditEventHandler()
                                  throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Causes a reset of the handler settings.

  Specified by:
    `restartAuditEventHandler` in interface `AuditEventHandlerContext`
  Throws:
    `IfsException` - if the operation fails

### purgeEvent

    public void purgeEvent(AuditEvent event)
                    throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Purges an AuditEvent from its audit history.

  Specified by:
    `purgeEvent` in interface `AuditEventHandlerContext`
  Parameters:
    `event` - the AuditEvent to purge
  Throws:
    `IfsException` - if the operation fails

### purgeEvents

    public void purgeEvents(AuditEvent[] events)
                     throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Purges a set of AuditEvents from their audit histories.

  Specified by:
    `purgeEvents` in interface `AuditEventHandlerContext`
  Parameters:
    `events` - the AuditEvents to purge
  Throws:
    `IfsException` - if the operation fails

### isDeactivated

    public boolean isDeactivated()

  Description copied from interface: `AuditEventHandlerContext`
  Determines whether a deactivation has occurred for this handler, indicated that it should complete processing the current operation as soon as possible.

  Specified by:
    `isDeactivated` in interface `AuditEventHandlerContext`
  Returns:
    true if the handler has been deactivated

### getNextSequenceId

    public long getNextSequenceId()
                           throws IfsException

  Description copied from interface: `AuditEventHandlerContext`
  Returns the next sequence ID value that would have been leveraged for a new Object created in the repository. This ID can be used as a high water mark when processing batches of Items.

  Specified by:
    `getNextSequenceId` in interface `AuditEventHandlerContext`
  Returns:
    the ID of the next Item that will be created
  Throws:
    `IfsException` - if the operation fails

### handleRuntimeStateEvent

    public boolean handleRuntimeStateEvent(LibrarySession session,
                                           AuditEvent event)
                                    throws IfsException

  Description copied from class: `EventHandlerAgent.InternalHandler`
  Handle a RuntimeState AuditEvent.

  Parameters:
    `session` - session context of the handler
    `event` - the event to handle
  Returns:
    true if the AuditEvent was applicable and handled by our Node context
  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