Class SecurityEvent
- java.lang.Object
-
- org.wildfly.security.auth.server.event.SecurityEvent
-
- Direct Known Subclasses:
SecurityDefiniteOutcomeEvent
,SecurityRealmUnavailableEvent
,SyslogAuditEvent
public abstract class SecurityEvent extends Object
Base class for security events emitted from aSecurityDomain
.- Author:
- Darran Lofthouse
-
-
Field Summary
Fields Modifier and Type Field Description private Instant
instant
private SecurityIdentity
securityIdentity
-
Constructor Summary
Constructors Constructor Description SecurityEvent(SecurityIdentity securityIdentity)
Constructor for a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <P,R>
Raccept(SecurityEventVisitor<P,R> visitor, P param)
Accept the given visitor, calling the method which is most applicable to this event type.Instant
getInstant()
Obtain theInstant
this event was created.SecurityIdentity
getSecurityIdentity()
Get theSecurityIdentity
that was active at the time this event was triggered.
-
-
-
Field Detail
-
instant
private final Instant instant
-
securityIdentity
private final SecurityIdentity securityIdentity
-
-
Constructor Detail
-
SecurityEvent
SecurityEvent(SecurityIdentity securityIdentity)
Constructor for a new instance.- Parameters:
securityIdentity
- the currentSecurityIdentity
for the event.
-
-
Method Detail
-
getSecurityIdentity
public SecurityIdentity getSecurityIdentity()
Get theSecurityIdentity
that was active at the time this event was triggered.- Returns:
- the
SecurityIdentity
that was active at the time this event was triggered.
-
getInstant
public Instant getInstant()
Obtain theInstant
this event was created.- Returns:
- the
Instant
this event was created.
-
accept
public <P,R> R accept(SecurityEventVisitor<P,R> visitor, P param)
Accept the given visitor, calling the method which is most applicable to this event type.- Type Parameters:
P
- the visitor parameter typeR
- the visitor return type- Parameters:
visitor
- the visitorparam
- the parameter to pass to the visitorhandleXxx
method- Returns:
- the value returned from the visitor
handleXxx
method
-
-