Interface BoundContext<S>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean associate​(S storage)
      Associate the context with the storage (for this thread).
      boolean dissociate​(S storage)
      Dissociate the context from the storage (for this thread).
      • Methods inherited from interface jakarta.enterprise.context.spi.AlterableContext

        destroy
      • Methods inherited from interface jakarta.enterprise.context.spi.Context

        get, get, getScope, isActive
    • Method Detail

      • associate

        boolean associate​(S storage)
        Associate the context with the storage (for this thread). Once associate(Object) has been called, further calls to associate(Object) will be ignored, until the context has been subsequently dissociate(Object) from the storage.
        Parameters:
        storage - the external storage
        Returns:
        true if the storage was attached, otherwise false
      • dissociate

        boolean dissociate​(S storage)
        Dissociate the context from the storage (for this thread). The context will only dissociate from the same storage it associated with.
        Parameters:
        storage - the external storage
        Returns:
        true if the storage was dissociated