public class EventHandlerAgent.InternalHandler extends Object implements AuditEventHandlerContext
Modifier and Type | Field and Description |
---|---|
protected LibrarySession |
m_AcquiredLibrarySession
The LibrarySession acquired from the session pool.
|
protected 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 boolean |
m_EventPostedTaskSubmitted
Indicates whether a EventPostedTask is currently submitted for processing.
|
protected EventHandlerAgent.RegisteredAuditSpecification |
m_RegisteredAuditSpecification
The referencing RegisteredAuditSpecification.
|
protected boolean |
m_TimerExpiredTaskSubmitted
Indicates whether a TimerExpiredTask is currently submitted for processing.
|
Modifier | Constructor and Description |
---|---|
protected |
InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras)
Constructs an InternalHandler, without a handler.
|
protected |
InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras,
AuditEventHandler handler)
Constructs a InternalHandler.
|
Modifier and Type | Method and Description |
---|---|
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
|
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(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(String key)
Gets a property of the running Node context.
|
AttributeValue |
getServerProperty(String key)
Gets a property of the running Server context.
|
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 boolean |
isEventPostedTaskSubmitted()
Checks if an EventPostedTask has been submitted and not yet processed.
|
protected boolean |
isTimerExpiredTaskSubmitted()
Checks if an TimerExpiredTask has been submitted and not yet processed.
|
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(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.
|
protected void |
setEventPostedTaskSubmitted(boolean val)
Sets indication of an EventPostedTask being submitted for processing.
|
void |
setHandlerProperty(String key,
AttributeValue value)
Sets a property of the custom Audit Specification.
|
protected void |
setTimerExpiredTaskSubmitted(boolean val)
Sets indication of an TimerExpiredTask being submitted for processing.
|
protected void |
timerExpired()
Handles timer expiration for the registered AuditSpecification.
|
String |
toString() |
protected EventHandlerAgent.RegisteredAuditSpecification m_RegisteredAuditSpecification
protected EventHandlerAgent.EventHandlerExecutor m_EventHandlerExecutor
protected LibrarySession m_AcquiredLibrarySession
protected ArrayList m_AuxiliaryLibrarySessionList
protected oracle.ifs.core.agents.EventHandlerAgent.EventPostedTask m_CurrentEventPostedTask
protected boolean m_EventPostedTaskSubmitted
protected boolean m_TimerExpiredTaskSubmitted
protected boolean m_Deactivated
protected InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras) throws IfsException
Used by the other constructor variants.
ras
- the registered AuditSpecificationIfsException
- if the operation failsprotected InternalHandler(EventHandlerAgent.RegisteredAuditSpecification ras, AuditEventHandler handler) throws IfsException
ras
- the registered AuditSpecificationhandler
- the AuditEventHandlerIfsException
- if the operation failsprotected void initialize(LibrarySession session) throws IfsException
session
- the agent thread's session contextIfsException
- if the operation failsprotected AuditSpecification getAuditSpecification(LibrarySession session) throws IfsException
session
- the session contextIfsException
- if the operation failsprotected void clearDomainContext(LibrarySession session)
session
- the session for which to clear the domain contextprotected void deactivate() throws IfsException
IfsException
- if the operation failsprotected void markDisposed() throws IfsException
IfsException
- if the operation failsprotected void alert(long minEventId) throws IfsException
minEventId
- minimum event ID encountered by disptacherIfsException
- if the operation failsprotected void timerExpired() throws IfsException
IfsException
- if the operation failsprotected void acquireSession() throws IfsException
Invoked in call() impl of all tasks that invoke methods on the handler interface.
IfsException
- if the operation failsprotected void releaseSession() throws IfsException
Invoked in call() impl of all tasks that invoke methods on the handler interface.
IfsException
- if the operation failsprotected void setCurrentEventPostedTask(oracle.ifs.core.agents.EventHandlerAgent.EventPostedTask task)
task
- the EventPostedTask being processed.IfsException
- if the operation failsprotected boolean isEventPostedTaskSubmitted()
protected boolean isTimerExpiredTaskSubmitted()
protected void setEventPostedTaskSubmitted(boolean val)
val
- indication of the processing stateprotected void setTimerExpiredTaskSubmitted(boolean val)
val
- indication of the processing statepublic LibrarySession getLibrarySession()
AuditEventHandlerContext
getLibrarySession
in interface AuditEventHandlerContext
public LibrarySession acquireAuxiliarySession() throws IfsException
AuditEventHandlerContext
acquireAuxiliarySession
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic Long getAuditSpecificationId()
AuditEventHandlerContext
Use this ID when using
AuditingUtilities.searchAuditHistory
to
find AuditEvents that have occurred that are of interest to this
handler.
getAuditSpecificationId
in interface AuditEventHandlerContext
public AuditSpecification getAuditSpecification() throws IfsException
AuditEventHandlerContext
getAuditSpecification
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic long getMinimumDispatchedEventId() throws IfsException
AuditEventHandlerContext
getMinimumDispatchedEventId
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic AttributeValue getHandlerProperty(String key) throws IfsException
AuditEventHandlerContext
getHandlerProperty
in interface AuditEventHandlerContext
key
- the Audit Specification property keyIfsException
- if the operation failspublic void setHandlerProperty(String key, AttributeValue value) throws IfsException
AuditEventHandlerContext
setHandlerProperty
in interface AuditEventHandlerContext
key
- the Audit Specification property keyvalue
- the Audit Specification property valueIfsException
- if the operation failspublic void removeHandlerProperty(String key) throws IfsException
AuditEventHandlerContext
removeHandlerProperty
in interface AuditEventHandlerContext
key
- the Audit Specification property keyIfsException
- if the operation failspublic AttributeValue getServerProperty(String key) throws IfsException
AuditEventHandlerContext
getServerProperty
in interface AuditEventHandlerContext
key
- the Server property keyIfsException
- if the operation failspublic AttributeValue getNodeProperty(String key) throws IfsException
AuditEventHandlerContext
getNodeProperty
in interface AuditEventHandlerContext
key
- the Node property keyIfsException
- if the operation failspublic void setDomainId(long domainId) throws IfsException
AuditEventHandlerContext
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.
setDomainId
in interface AuditEventHandlerContext
domainId
- the ID of the Domain to use while processing an Event
or zero to clear the previously established
Domain contextIfsException
- if the operation failspublic void restartAuditEventHandler() throws IfsException
AuditEventHandlerContext
restartAuditEventHandler
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic void purgeEvent(AuditEvent event) throws IfsException
AuditEventHandlerContext
purgeEvent
in interface AuditEventHandlerContext
event
- the AuditEvent to purgeIfsException
- if the operation failspublic void purgeEvents(AuditEvent[] events) throws IfsException
AuditEventHandlerContext
purgeEvents
in interface AuditEventHandlerContext
events
- the AuditEvents to purgeIfsException
- if the operation failspublic boolean isDeactivated()
AuditEventHandlerContext
isDeactivated
in interface AuditEventHandlerContext
public long getNextSequenceId() throws IfsException
AuditEventHandlerContext
getNextSequenceId
in interface AuditEventHandlerContext
IfsException
- if the operation failsCopyright © 2023. All rights reserved.