public class EventHandlerAgent extends IfsServer implements IfsEventHandler
AuditEventHandler
,
AuditEventHandlerContext
Modifier and Type | Class and Description |
---|---|
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.
|
IfsServer.ServerRequest
Modifier and Type | Field and Description |
---|---|
static int |
REQUESTTYPE_ADD_AUDITSPECIFICATION
An "Add AuditSpecification" request.
|
static int |
REQUESTTYPE_DELETE_AUDITSPECIFICATION
A "Delete AuditSpecification" request.
|
LEVEL_HIGH, LEVEL_LOW, LEVEL_MEDIUM, LEVEL_OFF
SERVERSTATUS_DISPOSED, SERVERSTATUS_RUNNING, SERVERSTATUS_STARTING, SERVERSTATUS_STOPPED, SERVERSTATUS_STOPPING, SERVERSTATUS_SUSPENDED, SERVERSTATUS_UNKNOWN
Constructor and Description |
---|
EventHandlerAgent()
Constructs a EventHandlerAgent.
|
Modifier and Type | Method and Description |
---|---|
void |
disableEventListening()
Disable listening for events on AuditSpecification instances.
|
void |
enableEventListening()
Enable listening events on any AuditSpecification.
|
IfsLogger |
getLogger()
Gets the appropriate logger for this server.
|
protected AttributeValueTable |
getTimerConfiguration()
Gets the Timer Configuration.
|
void |
handleEvent(IfsEvent event)
Handles events.
|
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 |
isAgent()
Gets whether this Server is an agent.
|
static void |
main(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.
|
checkSession, connectSession, constructSession, convertTimerInterval, convertTimerInterval, convertTimerInterval, dispose, getLastTimerActivation, getNextTimerActivation, getService, getTimerActivationPeriod, getTimerClassName, handlePriorityChangeRequest, handlePropertyChangeRequest, handlePropertyChangeRequest, handleRequests, handleServerStateControllerRequest, isNonCompeting, isPropertyReadonly, isServiceAvailable, isTimerActive, isTokenNonCompeting, postCheckServerStateRequest, postRequest, preRun, processEvents, queueEvent, resetTimer, restart, resume, serviceAvailabilityCheckNeeded, setPriority, setProperty, setProperty, start, startTimer, stop, stopRequested, stopTimer, suspend, timerExpired, waitForServiceAvailability, waitServer
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, releaseSession, releaseSession, setDesiredStatus, setDesiredStatus, setSessionTimeoutPrevented, setStateProperty, setStatus, startStandalone, startStandalone, supportsPriority, toStatusLabel, toStatusLabel, toStatusLabel, verifyNotDisposed, verifyNotDisposed
public static final int REQUESTTYPE_ADD_AUDITSPECIFICATION
public static final int REQUESTTYPE_DELETE_AUDITSPECIFICATION
public EventHandlerAgent() throws IfsException
IfsException
- if the operation failspublic static void main(String[] args) throws Exception
args
- command line argsException
- if the operation failspublic IfsLogger getLogger()
Typically overridden by subclasses to return the IfsLogger associatged with the specific server.
public void initialize() throws Exception
initialize
in class IfsServer
Exception
- if the operation failspublic boolean isAgent() throws IfsException
Server
Returns false by default.
isAgent
in interface ServerInterface
isAgent
in class Server
IfsException
- (IFS-45178) if the operation failspublic void postRun()
protected void handleStopRequest() throws Exception
IfsServer
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.
handleStopRequest
in class IfsServer
Exception
- if the operation failspublic boolean supportsSuspendResume()
Server
If false, then suspend
and resume
will result in stop and start instead.
supportsSuspendResume
in interface ServerInterface
supportsSuspendResume
in class Server
protected void handleSuspendRequest() throws Exception
IfsServer
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.
handleSuspendRequest
in class IfsServer
Exception
- if the operation failsprotected void handleResumeRequest() throws Exception
IfsServer
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.
handleResumeRequest
in class IfsServer
Exception
- if the operation failspublic void enableEventListening() throws IfsException
IfsException
- if the operation failspublic void disableEventListening() throws IfsException
IfsException
- if the operation failspublic void handleEvent(IfsEvent event) throws IfsException
This queues requests for processing by the main agent thread. Unlike
most agents, it does not queue event to be handled by
processEvents
.
handleEvent
in interface IfsEventHandler
event
- the eventIfsException
- if the operation failspublic void processEvent(IfsEvent event) throws IfsException
processEvent
in class IfsServer
event
- The next event to process.IfsException
- if the operation failsprotected void handleTimerExpired() throws Exception
handleTimerExpired
in class IfsServer
Exception
- if the operation failsprotected AttributeValueTable getTimerConfiguration() throws IfsException
IfsServer
Subclasses may override this to derive different values for the timer settings (see oracle.ifs.core.agents.AccessControlListIndexAgent).
getTimerConfiguration
in class IfsServer
IfsException
- if the operation failsprotected void handleRequest(IfsServer.ServerRequest request) throws IfsException
Overridden to handle the custom requests for this agent. Defers to super for the standard request types.
handleRequest
in class IfsServer
request
- the request to handleIfsException
- if the operation failsCopyright © 2023. All rights reserved.