Interface ContainerProvider<CC,S,L,SC>
- Type Parameters:
CC- the container context typeS- the container session typeL- the container session event listener typeSC- 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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA provider where session attributes implement the passivation/activation event listener.static interfaceA provider that does not emit passivation/activation events. -
Method Summary
Modifier and TypeMethodDescriptiondefault SgetDetachableSession(SessionManager<SC> manager, ImmutableSession session, CC context) Returns a container facade to a detachable session.getDetachedSession(SessionManager<SC> manager, String id, CC context) Returns a container facade to a detached session.Returns a unique identifier of the specified context.getPostActivateEventNotifier(L listener) Returns a post-activation event notifier for the specified session event listener.getPrePassivateEventNotifier(L listener) Returns the pre-passivation event notifier for the specified session event listener.getSessionEventListener(Consumer<S> prePassivateEventNotifier, Consumer<S> postActivateEventNotifier) Composes a specification listener with the specified pre/post event logic.getSessionEventListener(S session, Object attribute) Returns the container specific activation/passivation listener for the specified attribute of the specified session, if one exists.
-
Method Details
-
getId
-
getDetachableSession
Returns a container facade to a detachable session.- Parameters:
manager- a session managersession- a session identifiercontext- a container context- Returns:
- a container facade to a detached session.
-
getDetachedSession
Returns a container facade to a detached session.- Parameters:
manager- a session managerid- a session identifiercontext- a container context- Returns:
- a container facade to a detached session.
-
getSessionEventListener
Returns the container specific activation/passivation listener for the specified attribute of the specified session, if one exists.- Parameters:
session- the session event sourceattribute- the session attribute event source- Returns:
- the container specific activation/passivation listener for the specified attribute of the specified session, if one exists.
-
getPrePassivateEventNotifier
-
getPostActivateEventNotifier
-
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 sessionpostActivateEventNotifier- a post-event consumer for a session- Returns:
- a specification listener implementation
-