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

    java.lang.Object
      oracle.ifs.core.runtime.Server
          oracle.ifs.core.runtime.IfsServer
              oracle.ifs.core.runtime.ClusteredServer
                  oracle.ifs.core.agents.EventHandlerAgent

All Implemented Interfaces:
  IfsEventHandler, ServerInterface, TimerContext

    public class EventHandlerAgent

extends ClusteredServer
implements IfsEventHandler

Executes AuditEventHandler implementations specified in custom AuditSpecification instances.

See Also:
  `AuditEventHandler`, `AuditEventHandlerContext`

Nested Class Summary
`class` | `EventHandlerAgent.EventHandlerExecutor` An Executor that performs notification tasks for EventHandlers and AuditEventHandlers.
`class` | `EventHandlerAgent.InternalHandler` Holds handler inforamtion about a registered AuditSpecification and manages the notifications to the associated custom internal handler.
`class` | `EventHandlerAgent.RegisteredAuditSpecification` RegisteredAuditSpecification holds information about a registered AuditSpecification and manages the notifications to the associated custom handler.

Nested classes/interfaces inherited from class oracle.ifs.core.runtime.IfsServer
`IfsServer.ServerRequest`

Field Summary

Fields inherited from class oracle.ifs.core.runtime.ClusteredServer
`REQUESTTYPE_CHECK_REGISTRATION, REQUESTTYPE_FORCE_CHECK_REGISTRATION`

Fields inherited from class oracle.ifs.core.runtime.Server
`LEVEL_HIGH, LEVEL_LOW, LEVEL_MEDIUM, LEVEL_OFF`

Fields inherited from interface oracle.ifs.core.runtime.ServerInterface
`SERVERSTATUS_DISPOSED, SERVERSTATUS_RUNNING, SERVERSTATUS_STARTING, SERVERSTATUS_STOPPED, SERVERSTATUS_STOPPING, SERVERSTATUS_SUSPENDED, SERVERSTATUS_UNKNOWN`

Constructor Summary
`EventHandlerAgent()` Constructs a EventHandlerAgent.

Method Summary
`void` | `cancelRegistration()` Cancels the registration for this Server.
`boolean` | `checkRegistration(java.lang.Long tokenId)` Checks the registration for this Server.
`protected java.lang.String` | `deriveAgentIdentifier()` Determines the value to use as the agent identifier for this server.
`protected java.lang.String` | `deriveRunningServerIdentifier()` Derives the string used to identify a running server.
`void` | `disableEventListening()` Disable listening for events on AuditSpecification instances.
`void` | `enableEventListening()` Enable listening events on any AuditSpecification.
`protected AttributeValueTable` | `getTimerConfiguration()` Gets the Timer Configuration.
`void` | `handleEvent(IfsEvent event)` Handles events.
`protected void` | `handlePropertyChangeRequest(AttributeValue av)` Handles updates to dynamic properties.
`protected void` | `handleRequest(IfsServer.ServerRequest request)` Handles the specified pending request.
`protected void` | `handleResumeRequest()` Called when this Server is requested to resume.
`protected void` | `handleStopRequest()` Called when this Server is requested to stop.
`protected void` | `handleSuspendRequest()` Called when this Server is requested to suspend.
`protected void` | `handleTimerExpired()` Handles a generic timer expiration.
`void` | `initialize()` Perform one time initialization tasks upon loading.
`boolean` | `initializeRegistration()` Initializes the registration for this Server.
`boolean` | `isAgent()` Gets whether this Server is an agent.
`boolean` | `isPropertyReadonly(java.lang.String name)` Returns true if the property name specified is readonly.
`protected boolean` | `isTokenNonCompeting()` Returns indication as to whether the server token is non-competing.
`static void` | `main(java.lang.String[] args)` Runs an EventHandlerAgent in standalone mode.
`void` | `postRun()` Performs post-run tasks for this agent.
`void` | `processEvent(IfsEvent event)` Process the next event.
`void` | `run()` Runs this agent.
`boolean` | `supportsSuspendResume()` Gets whether this Server supports suspend/resume.

Methods inherited from class oracle.ifs.core.runtime.ClusteredServer
`getAgentIdentifier, getAgentIdentifierPrefix, getRegistrationPeriod, getRunningNodeIdentifier, getRunningNodeName, getRunningServerIdentifier, getRunningServersEnumeration, isRegistered, isServerRunning, releaseTokenRegistration, requestForcedRegistrationCheck, requestRegistrationCheck`

Methods inherited from class oracle.ifs.core.runtime.IfsServer
`checkSession, connectSession, constructSession, convertTimerInterval, convertTimerInterval, convertTimerInterval, dispose, getLastTimerActivation, getNextTimerActivation, getService, getTimerActivationPeriod, getTimerClassName, handlePriorityChangeRequest, handlePropertyChangeRequest, handleRequests, isTimerActive, postRequest, preRun, processEvents, queueEvent, resetTimer, restart, resume, setPriority, setProperty, setProperty, start, startTimer, stop, stopRequested, stopTimer, suspend, timerExpired, waitServer`

Methods inherited from class oracle.ifs.core.runtime.Server
`acquireSession, constructLibrarySessionPool, createServerState, deregister, disconnectSession, getConfigurationOverridesTable, getConfigurationTable, getCredential, getDesiredStatus, getIfsHome, getInitialConfigurationTable, getLoggerForLegacyLogging, getName, getNode, getNodeName, getOracleHome, getParameterTable, getPriority, getProperties, getProperty, getServerConfigurationName, getServerState, getServerStateValue, getServerType, getServiceName, getSession, getStateTable, getStatus, getSystemUserCredential, handleServerConfigurationOverrideRequest, handleServerStateEvent, initialize, initialize, isDisposed, isInitialized, isLogged, log, log, log, postAuditEvent, releaseSession, releaseSession, setDesiredStatus, setDesiredStatus, setSessionTimeoutPrevented, setStateProperty, setStatus, startStandalone, startStandalone, supportsPriority, toStatusLabel, toStatusLabel, toStatusLabel, verifyNotDisposed, verifyNotDisposed`

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

Constructor Detail

### EventHandlerAgent

    public EventHandlerAgent()
                      throws IfsException

  Constructs a EventHandlerAgent.

  Throws:
    `IfsException` - if the operation fails

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Description copied from class: `EventHandlerAgent`
  Runs an EventHandlerAgent in standalone mode.

  Parameters:
    `args` - command line args
  Throws:
    `java.lang.Exception` - if the operation fails

### initialize

    public void initialize()
                    throws java.lang.Exception

  Description copied from class: `EventHandlerAgent`
  Perform one time initialization tasks upon loading.

  Overrides:
    `initialize` in class `Server`
  Throws:
    `java.lang.Exception` - if the operation fails

### isPropertyReadonly

    public boolean isPropertyReadonly(java.lang.String name)
                               throws IfsException

  Description copied from class: `EventHandlerAgent`
  Returns true if the property name specified is readonly.

  Specified by:
    `isPropertyReadonly` in interface `ServerInterface`
  Overrides:
    `isPropertyReadonly` in class `ClusteredServer`
  Parameters:
    `name` - name of the property
  Returns:
    true if property is readonly; false otherwise
  Throws:
    `IfsException` - if the operation fails

### handlePropertyChangeRequest

    protected void handlePropertyChangeRequest(AttributeValue av)
                                        throws java.lang.Exception

  Description copied from class: `EventHandlerAgent`
  Handles updates to dynamic properties.

  Overrides:
    `handlePropertyChangeRequest` in class `IfsServer`
  Parameters:
    `av` - the property that was changed
  Throws:
    `java.lang.Exception` - if the operation fails

### isAgent

    public boolean isAgent()
                    throws IfsException

  Description copied from class: `Server`
  Gets whether this Server is an agent.

  Returns false by default.

  Specified by:
    `isAgent` in interface `ServerInterface`
  Overrides:
    `isAgent` in class `Server`
  Returns:
    false
  Throws:
    `IfsException` - (IFS-45178) if the operation fails

### run

    public void run()

  Description copied from class: `EventHandlerAgent`
  Runs this agent.

  Specified by:
    `run` in class `IfsServer`

### postRun

    public void postRun()

  Description copied from class: `EventHandlerAgent`
  Performs post-run tasks for this agent.

  Overrides:
    `postRun` in class `IfsServer`

### handleStopRequest

    protected void handleStopRequest()
                              throws java.lang.Exception

  Description copied from class: `IfsServer`
  Called when this Server is requested to stop.

  This method is called by `handleRequests`. Override it to perform tasks upon a request to stop. If not overridden, this method simply causes subsequent calls to `stopRequested` to return `true`.

  The `handleRequests` method will rethrow any exception thrown by this method.

  Overrides:
    `handleStopRequest` in class `IfsServer`
  Throws:
    `java.lang.Exception` - if the operation fails

### supportsSuspendResume

    public boolean supportsSuspendResume()

  Description copied from class: `Server`
  Gets whether this Server supports suspend/resume.

  If false, then `suspend` and `resume` will result in stop and start instead.

  Specified by:
    `supportsSuspendResume` in interface `ServerInterface`
  Overrides:
    `supportsSuspendResume` in class `Server`
  Returns:
    false; subclasses may override

### handleSuspendRequest

    protected void handleSuspendRequest()
                                 throws java.lang.Exception

  Description copied from class: `IfsServer`
  Called when this Server is requested to suspend.

  This method is called by `handleRequests`. Override it to perform tasks upon a suspend request. Unless overridden, no operation is performed by this method.

  If this method returns without throwing, the Server's status is set to `SERVERSTATUS_SUSPENDED`.

  The `handleRequests` method will rethrow any exception thrown by this method.

  Overrides:
    `handleSuspendRequest` in class `IfsServer`
  Throws:
    `java.lang.Exception` - if the operation fails

### handleResumeRequest

    protected void handleResumeRequest()
                                throws java.lang.Exception

  Description copied from class: `IfsServer`
  Called when this Server is requested to resume.

  This method is called by `handleRequests`. Override it to perform tasks upon a resume request. Unless overridden, no operation is performed by this method.

  If this method returns without throwing, the Server's status is set to `SERVERSTATUS_RUNNING`.

  The `handleRequests` method will rethrow any exception thrown by this method.

  Overrides:
    `handleResumeRequest` in class `IfsServer`
  Throws:
    `java.lang.Exception` - if the operation fails

### enableEventListening

    public void enableEventListening()
                              throws IfsException

  Description copied from class: `EventHandlerAgent`
  Enable listening events on any AuditSpecification.

  Throws:
    `IfsException` - if the operation fails

### disableEventListening

    public void disableEventListening()
                               throws IfsException

  Description copied from class: `EventHandlerAgent`
  Disable listening for events on AuditSpecification instances.

  Throws:
    `IfsException` - if the operation fails

### handleEvent

    public void handleEvent(IfsEvent event)
                     throws IfsException

  Description copied from class: `EventHandlerAgent`
  Handles events.

  This queues requests for processing by the main agent thread. Unlike most agents, it does not queue event to be handled by `processEvents`.

  Specified by:
    `handleEvent` in interface `IfsEventHandler`
  Parameters:
    `event` - the event
  Throws:
    `IfsException` - if the operation fails

### processEvent

    public void processEvent(IfsEvent event)
                      throws IfsException

  Description copied from class: `EventHandlerAgent`
  Process the next event.

  Overrides:
    `processEvent` in class `IfsServer`
  Parameters:
    `event` - The next event to process.
  Throws:
    `IfsException` - if the operation fails

### deriveAgentIdentifier

    protected java.lang.String deriveAgentIdentifier()
                                              throws IfsException

  Description copied from class: `EventHandlerAgent`
  Determines the value to use as the agent identifier for this server.

  The default implementation in this class uses the unqualified name of the agent prefixed with "IFS.AGENT.INTERNAL.". For example, "IFS.AGENT.INTERNAL.CleanupAgent".

  Can be overridden by subclasses that wish to use a different value.

  Overrides:
    `deriveAgentIdentifier` in class `ClusteredServer`
  Returns:
    the agent identifier to use
  Throws:
    `IfsException` - if the operation fails

### deriveRunningServerIdentifier

    protected java.lang.String deriveRunningServerIdentifier()
                                                      throws IfsException

  Description copied from class: `EventHandlerAgent`
  Derives the string used to identify a running server.

  By default, it is a composite of the agent identifier and the running node identifer, e.g. "IFS.AGENT.INTERNAL.CleanupAgent:stadc35_node1:9461928".

  Overrides:
    `deriveRunningServerIdentifier` in class `ClusteredServer`
  Returns:
    the running server identifier to use
  Throws:
    `IfsException` - if the operation fails

### isTokenNonCompeting

    protected boolean isTokenNonCompeting()
                                   throws IfsException

  Description copied from class: `EventHandlerAgent`
  Returns indication as to whether the server token is non-competing.

  A non-competing token is one that always assumes a Primary registration type, and always attempts to free the ApplicationToken upon unregistration.

  Overrides:
    `isTokenNonCompeting` in class `ClusteredServer`
  Returns:
    true if token is non-competing; false otherwise
  Throws:
    `IfsException` - if the operation fails

### initializeRegistration

    public boolean initializeRegistration()
                                   throws IfsException

  Description copied from class: `EventHandlerAgent`
  Initializes the registration for this Server.

  This method is called when the Server is about to enter the run loop, and when it is resumed.

  Overrides:
    `initializeRegistration` in class `ClusteredServer`
  Returns:
    true if the server instance is registered; false otherwise
  Throws:
    `IfsException` - if the operation fails

### cancelRegistration

    public void cancelRegistration()
                            throws IfsException

  Description copied from class: `EventHandlerAgent`
  Cancels the registration for this Server.

  This method is called when the Server exits the run loop, and when it is suspended.

  Can be extended by clustered servers that have subordinate agent IDs to release (e.g. in EventHandlerAgent).

  Overrides:
    `cancelRegistration` in class `ClusteredServer`
  Throws:
    `IfsException` - if the operation fails

### checkRegistration

    public boolean checkRegistration(java.lang.Long tokenId)
                              throws IfsException

  Description copied from class: `EventHandlerAgent`
  Checks the registration for this Server.

  The tokenId argument specified indicates whether there is a specific token context for the check registration request, which can occur is the re-check is triggered by an event. If the tokenId specified is null, the re-check should be performed without exception.

  Overrides:
    `checkRegistration` in class `ClusteredServer`
  Parameters:
    `tokenId` - the token Id context; null indicates that the registration check should unequivocally
  Returns:
    true if the server instance is registered; false otherwise
  Throws:
    `IfsException` - if the operation fails

### handleTimerExpired

    protected void handleTimerExpired()
                               throws java.lang.Exception

  Description copied from class: `EventHandlerAgent`
  Handles a generic timer expiration.

  Overrides:
    `handleTimerExpired` in class `IfsServer`
  Throws:
    `java.lang.Exception` - if the operation fails

### getTimerConfiguration

    protected AttributeValueTable getTimerConfiguration()
                                                 throws IfsException

  Description copied from class: `IfsServer`
  Gets the Timer Configuration.

  Subclasses may override this to derive different values for the timer settings (see oracle.ifs.core.agents.AccessControlListIndexAgent).

  Overrides:
    `getTimerConfiguration` in class `IfsServer`
  Returns:
    the Timer configuration
  Throws:
    `IfsException` - if the operation fails

### handleRequest

    protected void handleRequest(IfsServer.ServerRequest request)
                          throws IfsException

  Description copied from class: `EventHandlerAgent`
  Handles the specified pending request.

  Overridden to handle the custom requests for this agent. Defers to super for the standard request types.

  Overrides:
    `handleRequest` in class `ClusteredServer`
  Parameters:
    `request` - the request to handle
  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