Interface SessionEventListenerSpecificationProvider<S,L>

Type Parameters:
S - the specification type for a session
L - the specification type for a session passivation listener

public interface SessionEventListenerSpecificationProvider<S,L>
Provides event specification facades to a session manager implementation.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    default Optional<L>
    Fabricates an optional container-specific listener for the specified attribute.
    asEventListener(Consumer<S> preEvent, Consumer<S> postEvent)
    Fabricates a specification listener with the specified pre/post event logic.
    Returns the specification type of the session event listener.
    postEvent(L listener)
    Returns a post-event notifier for the specified session event listener.
    preEvent(L listener)
    Returns a pre-event notifier for the specified session event listener.
  • Method Details

    • asEventListener

      default Optional<L> asEventListener(Object attribute)
      Fabricates an optional container-specific listener for the specified attribute.
      Returns:
      an optional container-specific listener.
    • getEventListenerClass

      Class<L> getEventListenerClass()
      Returns the specification type of the session event listener.
      Returns:
    • preEvent

      Consumer<S> preEvent(L listener)
      Returns a pre-event notifier for the specified session event listener.
      Parameters:
      listener - the specification listener
      Returns:
      a consumer for a session
    • postEvent

      Consumer<S> postEvent(L listener)
      Returns a post-event notifier for the specified session event listener.
      Parameters:
      listener - the specification listener
      Returns:
      a consumer for a session
    • asEventListener

      L asEventListener(Consumer<S> preEvent, Consumer<S> postEvent)
      Fabricates a specification listener with the specified pre/post event logic.
      Parameters:
      preEvent - a pre-event consumer for a session
      postEvent - a post-event consumer for a session
      Returns:
      a specification listener implementation