Class RealmEventVisitor<P,R>

java.lang.Object
org.wildfly.security.auth.server.event.RealmEventVisitor<P,R>
Type Parameters:
P - the visitor's parameter type (may be Void)
R - the visitor's return type (may be Void)

public abstract class RealmEventVisitor<P,R> extends Object
A class which provides an easy way to handle realm events based on the type of the event. The visitor can accept a parameter and return a value. To invoke the appropriate visitor method based on the event type, use the <P, R> R RealmEvent.accept(RealmEventVisitor<P, R>, P) method.
Author:
David M. Lloyd
  • Constructor Details

    • RealmEventVisitor

      protected RealmEventVisitor()
      Construct a new instance.
  • Method Details

    • handleUnknownEvent

      public R handleUnknownEvent(RealmEvent event, P param)
      Handle any unhandled realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleAuthenticationEvent

      public R handleAuthenticationEvent(RealmAuthenticationEvent event, P param)
      Handle any authentication-related realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleAbandonedAuthenticationEvent

      public R handleAbandonedAuthenticationEvent(RealmAbandonedAuthenticationEvent event, P param)
      Handle an abandoned authentication realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleDefiniteOutcomeAuthenticationEvent

      public R handleDefiniteOutcomeAuthenticationEvent(RealmDefiniteOutcomeAuthenticationEvent event, P param)
      Handle a definite-outcome authentication realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleSuccessfulAuthenticationEvent

      public R handleSuccessfulAuthenticationEvent(RealmSuccessfulAuthenticationEvent event, P param)
      Handle a successful authentication realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleFailedAuthenticationEvent

      public R handleFailedAuthenticationEvent(RealmFailedAuthenticationEvent event, P param)
      Handle a failed authentication realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleAuthorizationEvent

      public R handleAuthorizationEvent(RealmAuthorizationEvent event, P param)
      Handle any authorization-related realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleIdentityAuthorizationEvent

      public R handleIdentityAuthorizationEvent(RealmIdentityAuthorizationEvent event, P param)
      Handle an identity authorization realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleIdentitySuccessfulAuthorizationEvent

      public R handleIdentitySuccessfulAuthorizationEvent(RealmIdentitySuccessfulAuthorizationEvent event, P param)
      Handle an identity successful authorization realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value
    • handleIdentityFailedAuthorizationEvent

      public R handleIdentityFailedAuthorizationEvent(RealmIdentityFailedAuthorizationEvent event, P param)
      Handle an identity failed authorization realm event.
      Parameters:
      event - the realm event
      param - the visitor parameter
      Returns:
      the visitor return value