Interface ContainerProvider<CC,S,L,SC>

Type Parameters:
CC - the container context type
S - the container session type
L - the container session event listener type
SC - the session context type
All Known Subinterfaces:
ContainerProvider.SessionAttributeEventListener<CC,S,L,SC>, ContainerProvider.VoidEventListener<CC,S,SC>

public interface ContainerProvider<CC,S,L,SC>
Provider of container specific facades.
Author:
Paul Ferraro
  • Method Details

    • getId

      String getId(CC context)
      Returns a unique identifier of the specified context.
      Parameters:
      context - a container context
      Returns:
      a unique identifier of the specified context.
    • getDetachableSession

      default S getDetachableSession(org.wildfly.clustering.session.SessionManager<SC> manager, org.wildfly.clustering.session.ImmutableSession session, CC context)
      Returns a container facade to a detachable session.
      Parameters:
      manager - a session manager
      session - a session identifier
      context - a container context
      Returns:
      a container facade to a detached session.
    • getDetachedSession

      S getDetachedSession(org.wildfly.clustering.session.SessionManager<SC> manager, String id, CC context)
      Returns a container facade to a detached session.
      Parameters:
      manager - a session manager
      id - a session identifier
      context - a container context
      Returns:
      a container facade to a detached session.
    • getSessionEventListener

      Optional<L> getSessionEventListener(S session, Object attribute)
      Returns the container specific activation/passivation listener for the specified attribute of the specified session, if one exists.
      Parameters:
      session - the session event source
      attribute - the session attribute event source
      Returns:
      the container specific activation/passivation listener for the specified attribute of the specified session, if one exists.
    • getPrePassivateEventNotifier

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

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

      Optional<L> getSessionEventListener(Consumer<S> prePassivateEventNotifier, Consumer<S> postActivateEventNotifier)
      Composes a specification listener with the specified pre/post event logic.
      Parameters:
      prePassivateEventNotifier - a pre-event consumer for a session
      postActivateEventNotifier - a post-event consumer for a session
      Returns:
      a specification listener implementation